February 2022
Intermediate to advanced
274 pages
6h 28m
English
Let’s look at an example pytest.ini file:
| | [pytest] |
| | addopts = |
| | --strict-markers |
| | --strict-config |
| | -ra |
| | |
| | testpaths = tests |
| | |
| | markers = |
| | smoke: subset of tests |
| | exception: check for expected exceptions |
The file starts with [pytest] to denote the start of the pytest settings. It may seem weird that we have to include this notation, given that it’s strictly a pytest configuration file. However, including [pytest] allows the pytest ini parsing to treat pytest.ini and tox.ini identically. After that are the individual settings, each on their own line (or multiple lines) in the form of <setting> = <value>.
Configuration settings that allow more than one ...
Read now
Unlock full access