September 2017
Intermediate to advanced
222 pages
5h 1m
English
One of the first things you’ll want to do once you’ve started writing tests is to run just one. Specify the file directly, and add a ::test_name, like this:
| | $ cd /path/to/code/ch1 |
| | $ pytest -v tasks/test_four.py::test_asdict |
| | =================== test session starts =================== |
| | collected 3 items |
| | |
| | tasks/test_four.py::test_asdict PASSED |
| | |
| | ================ 1 passed in 0.01 seconds ================= |
Now, let’s take a look at some of the options.
Read now
Unlock full access