Я не могу найти никакой официальной документации, в которой описывается, как реализуется pytest. эти файлы. Это лучшее, что я смог найти, и это было не очень полезно: https://docs.pytest.org/en/8.3.x/how-to ... -in-a-test -module-or-conftest-file
Вот выходные данные версии 7.2.2:
Код: Выделить всё
> $ pytest test_simple_module.py -s [±main ●]
CONFTEST ../../ LOADED
CONFTEST .. LOADED
CONFTEST . LOADED
======================================================== test session starts =========================================================
platform darwin -- Python 3.11.10, pytest-7.2.2, pluggy-1.0.0
rootdir: /Users/steve/python/tests/TestUtils/PytestWrapper/simple_module
plugins: anyio-3.7.1
collecting ...
Collected test items:
Код: Выделить всё
(test_env) > $ pytest -s test_simple_module.py [±main ●]
CONFTEST . LOADED
========================================================== test session starts ===========================================================
platform darwin -- Python 3.12.7, pytest-8.3.3, pluggy-1.5.0
rootdir: /Users/steve/python/tests/TestUtils/PytestWrapper/simple_module
collected 7 items
Подробнее здесь: https://stackoverflow.com/questions/790 ... t-py-files