August 2018
Beginner
160 pages
4h 8m
English
As discussed previously, a common directory structure is out-of-source layout, with tests separated from the application/library code in a tests or similarly named directory. In that layout it is useful to use the testpaths configuration option:
[pytest]testpaths = tests
This will tell pytest where to look for tests when no files, directories, or node ids are given in the command line, which might speed up test collection. Note that you can configure more than one directory, separated by spaces.
Read now
Unlock full access