September 2017
Intermediate to advanced
222 pages
5h 1m
English
If you run the test from the last section, you don’t get to see what fixtures are run:
| | $ cd /path/to/code/ |
| | $ pip install ./tasks_proj/ # if not installed yet |
| | $ cd /path/to/code/ch3/a/tasks_proj/tests/func |
| | $ pytest -v test_add.py -k valid_id |
| | ===================== test session starts ====================== |
| | collected 3 items |
| | |
| | test_add.py::test_add_returns_valid_id PASSED |
| | |
| | ====================== 2 tests deselected ====================== |
| | ============ 1 passed, 2 deselected in 0.02 seconds ============ |
When I’m developing fixtures, I like to see what’s running and when. Fortunately, pytest provides a command-line flag, --setup-show, that does just ...
Read now
Unlock full access