Utilities for spying on function calls in Python unit tests


Spies intercept and record calls to functions. They can report on how many times a function was called and with what arguments. They can allow the function call to go through as normal, to block it, or to reroute it to another function.

Spies are like mocks, but better. You're not mocking the world. You're replacing very specific function logic, or listening to functions without altering them.

Upload more screenshots

Please help extend the collection of screenshots. Just make a screenshot and upload it here. You don't need to register or anything.

Upload a screenshot

Hint: upload an image here from your clipboard with Ctrl-V


Install this software package

If the package is available for the distribution you are currently using on your computer then install the software by clicking on…

Install python3-kgb