September 2017
Intermediate to advanced
222 pages
5h 1m
English
These plugins don’t change how test are run, but they do change the output you see.
Usually pytest displays the status of each test, and then after all the tests are finished, pytest displays the tracebacks of the failed or errored tests. If your test suite is relatively fast, that might be just fine. But if your test suite takes quite a bit of time, you may want to see the tracebacks as they happen, rather than wait until the end. This is the functionality of the pytest-instafail plugin.[38] When tests are run with the --instafail flag, the failures and errors appear right away.
Here’s a test with normal failures at the end:
| | $ cd |
Read now
Unlock full access