145: For Those About to Mock - Michael Foord
A discussion about mocking in Python with the original contributor of unittest.mock, Michael Foord.
Of course we discuss mocking and unittest.mock.
We also discuss:
- testing philosophy
- unit testing and what a unit is
- TDD
- where Michael's towel is, and what color
Micheal was instrumental in the building of testing tools for Python, and continues to be a pragmatic source of honest testing philosopy in a field that has a lot of contradictory information.
Links:
- unittest.mock - Python docs
- Mocks Aren't Stubs - Martin Fowler
- pytest-mock
- mock.patch
- Autospeccing
- Arrange Act Assert
- testing-in-python mailing list
- Classical and Mockist Testing — Classical and Mockist Testing
- Test First Programming / Test First Development
- episode 102: Cosmic Python, TDD, testing and external dependencies - Harry Percival
- episode 132: mocking in Python - Anna-Lena Popkes
- pytest
- unittest - Python docs
- pytest assert usage
- 30 best practices for software development and testing | Opensource.com
Creators and Guests

Guest
Michael Foord
Michael was a Python trainer and contractor. He specialised in teaching Python and the end-to-end automated testing of systems. As a Python core developer he wrote parts of unittest and created the mock library which became unittest.mock. He was a hoopy frood.
