You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#11043: When --confcutdir is not specified, and there is no config file present, the conftest cutoff directory (--confcutdir) is now set to the rootdir. Previously in such cases, conftest.py files would be probed all the way to the root directory of the filesystem. If you are badly affected by this change, consider adding an empty config file to your desired cutoff directory, or explicitly set --confcutdir.
Since there is no config file in your project directory (pytest.ini, pyproject.toml, tox.ini, or setup.cfg), pytest determines rootdir: .../pytest11261/test/unit and doesn't load the conftest.py outside of it.
As mentioned by the changelog, creating e.g. an empty pytest.ini in the pytest11261 folder fixes this.
I created a fixture located in my
test/
directory inconftest.py
.I also have another conftest.py file located under
test/unit
with more fixtures specific to unit tests.I am observing that after I upgrade from pytest 7.3.1 to 7.4.0, the "higher" of the two conftest.py files I have is never loaded.
Downgrading back to pytest 7.3.1 restores the expected functionality.
The text was updated successfully, but these errors were encountered: