September 2017
Intermediate to advanced
222 pages
5h 1m
English
This is a test:
| | def test_passing(): |
| | assert (1, 2, 3) == (1, 2, 3) |
This is what it looks like when it’s run:
| | $ cd /path/to/code/ch1 |
| | $ pytest test_one.py |
| | ===================== test session starts ====================== |
| | collected 1 items |
| | |
| | test_one.py . |
| | |
| | =================== 1 passed in 0.01 seconds =================== |
The dot after test_one.py means that one test was run and it passed. If you need more information, you can use -v or --verbose:
| | $ pytest -v test_one.py |
| | ===================== test session starts ====================== |
| | collected 1 items |
| | |
| | test_one.py::test_passing PASSED |
| | |
| | =================== 1 passed in 0.01 seconds =================== ... |
Read now
Unlock full access