September 2017
Intermediate to advanced
222 pages
5h 1m
English
Before I discuss how you can alter pytest’s default behavior, let’s run down all of the non-test files in pytest and specifically who should care about them. Everyone should know about these:
pytest.ini: This is the primary pytest configuration file that allows you to change default behavior. Since there are quite a few configuration changes you can make, a big chunk of this chapter is about the settings you can make in pytest.ini.
conftest.py: This is a local plugin to allow hook functions and fixtures for the directory where the conftest.py file exists and all subdirectories. conftest.py files are covered Chapter 5, Plugins.
__init__.py: When put into every test subdirectory, this file allows you ...
Read now
Unlock full access