February 2022
Intermediate to advanced
274 pages
6h 28m
English
Even before it starts looking for test files to run, pytest reads the configuration file—the pytest.ini file or the tox.ini, setup.cfg, or pyproject.toml files that contain a pytest section.
If you’ve passed in a test directory, pytest starts looking there. If you’ve passed in multiple files or directories, pytest starts at the common ancestor of all of them. If you don’t pass in a file or directory, it starts at the current directory. If pytest finds a configuration file at the starting directory, that’s the root. If not, pytest goes up the directory tree until it finds a configuration file that has a pytest section in it. Once pytest finds a configuration file, it marks the directory where it found ...
Read now
Unlock full access