132: mocking in Python - Anna-Lena Popkes
Using mock objects during testing in Python.
Anna-Lena joins the podcast to teach us about mocks and using unittest.mock objects during testing.
We discuss:
- the different styles of using mocks
- pros and cons of mocks
- dependency injection
- adapter pattern
- mock hell
- magical universe
- and much more
Special Guest: Anna-Lena Popkes.
Links:
- Personal webpage of Anna-Lena Popkes
- Magical Universe — Awesome Python features explained using the world of magic
- Test & Code 102: Cosmic Python, TDD, testing and external dependencies — The episode where Harry Percival discusses mocking.
- Talk: Harry Percival - Stop Using Mocks (for a while) - YouTube — Talk: Harry Percival - Stop Using Mocks (for a while)
- unittest.mock
- Autospeccing
- Mock Hell Talk (45 min version) Edwin Jung - PyCon 2019
- Mock Hell Talk (30 min version) - Edwin Jung - PyConDE
- PyCon Estonia
- KI macht Schule!
- Talk Python #186 : 100 Days of Python in a Magical Universe
Help support the show AND learn pytest:
- The Complete pytest course is now a bundle, with each part available separately.
- pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively.
- Using pytest with Projects has lots of "when you need it" sections like debugging failed tests, mocking, testing strategy, and CI
- Then pytest Booster Rockets can help with advanced parametrization and building plugins.
- Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you.
Creators and Guests
