August 2018
Beginner
160 pages
4h 8m
English
In some situations, tests need features that are complex or hard to set up in a testing environment, for example:
The monkeypatch fixture allows you to cleanly overwrite functions, objects, and dictionary entries of the system being tested with other objects and functions, undoing all changes during test teardown. For example:
import getpassdef user_login(name): password = getpass.getpass() check_credentials(name, password) ...
In this ...
Read now
Unlock full access