@@ -72,7 +72,8 @@ the test that creates them.
7272and injects its fixtures; nothing should import it by name with
7373` from conftest import ... ` . Keeping it off the import path is what allows
7474pytest to build the correct fixture hierarchy from multiple ` conftest.py ` files
75- at different directory levels.
75+ at different directory levels. See the pytest docs:
76+ https://docs.pytest.org/en/stable/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files
7677
7778Keep the two kinds of shared test code in their proper places:
7879
@@ -89,9 +90,10 @@ pytest automatically makes its fixtures available to tests in that directory
8990and propagates fixtures from parent ` conftest.py ` files downward — no
9091` __init__.py ` is required for this to work.
9192
92- The suite uses pytest's default ` prepend ` import mode. ` pytest.ini ` sets
93- ` pythonpath = tests ` so that every test file, regardless of how deep it sits,
94- can resolve ` from helpers.xxx import ... ` against the ` tests/ ` root.
95- Without that setting, test files in subdirectories without ` __init__.py `
96- would get their own subdirectory prepended to ` sys.path ` instead of ` tests/ ` ,
97- and the ` helpers ` package would not be found.
93+ The suite uses pytest's default ` prepend ` import mode
94+ (https://docs.pytest.org/en/stable/explanation/goodpractices.html#choosing-an-import-mode ).
95+ ` pytest.ini ` sets ` pythonpath = tests ` so that every test file, regardless of
96+ how deep it sits, can resolve ` from helpers.xxx import ... ` against the
97+ ` tests/ ` root. Without that setting, test files in subdirectories without
98+ ` __init__.py ` would get their own subdirectory prepended to ` sys.path ` instead
99+ of ` tests/ ` , and the ` helpers ` package would not be found.
0 commit comments