August 2018
Beginner
160 pages
4h 8m
English
When doing large-scale refactorings, you might not know beforehand how or which tests are going to be affected. In those situations, you might try to guess which modules will be affected and start running tests for those. But, often, you end up breaking more tests than you initially estimated and quickly try to stop the test session by hitting CTRL+C when everything starts to fail unexpectedly.
In those situations, you might try using the --maxfail=N command-line flag, which stops the test session automatically after N failures or errors, or the shortcut -x, which equals --maxfail=1.
λ pytest tests/core -x
This allows you to quickly see the first failing test and deal with the failure. After fixing the reason for ...
Read now
Unlock full access