I'm trying to understand what conftest.py
files are meant to be used for.
In my (currently small) test suite I have one conftest.py
file at the project root. I use it to define the fixtures that I inject into my tests.
I have two questions:
conftest.py
? Does it have other uses?conftest.py
file? When would I want to do that? Examples will be appreciated.More generally, how would you define the purpose and correct use of conftest.py
file(s) in a pytest test suite?