Version 7.1.0 seems like not picking up conftest.py
See original GitHub issueOver SciPy we have started to see the message in the title in our Azure Pipelines which started picking up 7.1.0 instead of 7.0.1 lastn ight. From the deprecation and removal list we couldn’t see which item might have caused it.
One speculation we might generate is that our slow mark is not registered in our pytest.ini file explicitly and maybe registrations are now obligatory.
Here is a complete SciPy test suite example with all installation steps provided.
And our pytest.ini file lives here
https://github.com/scipy/scipy/blob/main/pytest.ini
Thank you for all the efforts.
Issue Analytics
- State:
- Created 2 years ago
- Comments:28 (13 by maintainers)
Top Results From Across the Web
Search — pytest documentation
To use it, include in your topmost conftest.py file: pytest_plugins ... source tree (e.g. in the site-packages directory) were not picked up. pytest...
Read more >Why doesn't pytest load conftest.py when running only a ...
In the first invocation, the conftest.py won't be found immediately since it's down the test root path, so it will be loaded while...
Read more >pytest.org (@pytestdotorg) / Twitter
I'm happy to announce the release of #pytest 7.2.0 a special perk is dropping the ... Version 7.1.0 seems like not picking up...
Read more >Pytests fixtures AttributeError: 'ProfileManager' object has no ...
I have setup my conftest.py to include both the aiida and aiida-vasp fixtures ... to update pytest to version 6.2.2, but the same...
Read more >pytest Documentation - Read the Docs
“How to use pytest with an existing test suite” for working with pre-existing ... conftest.py file so that tests from multiple test modules....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is released in 7.1.1. Thanks @ilayn, @andyfaff, @adrianeboyd, @Akasurde and @mariolenz for the reports, and @The-Compiler for the help.
OK that makes it clear…
The previous
is_in_confcutdircheck was:This excludes paths which are directly above confcutdir, e.g. if
confcutdiris/a/b/c/, it will exclude/,/a/,/a/b/. But it doesn’t exclude/x/,/a/b/xetc.The new
is_in_confcutdircheck is:which rejects everything not under
confcutdir, e.g./xetc. are rejected.The documentation of
--confcutdirsaysonly load conftest.py's relative to specified dir.which makes the new behavior sound correct. However, the name “cut” itself as well as c000955dde3ecc12291c8890ba29887d7b6ef1f2 make it sound like the previous behavior was actually the intended one.The pytest thinc invocation runs the tests out-of-tree - not running against the tests in the source code, but using
--pyargswhich picks the tests from the venv/site-packages. This is not under the confcutdir, so the new behavior now ignores the conftests there. This is definitely a bug.However the old behavior is pretty weird as well - e.g. consider a setup like this:
And we’re running
/home/ran/python/venvs/venv/bin/python -m pytest --pyargs thinc.tests. Then pytest will pick up conftests in each ofwhich is definitely not expected.
In any case, for now I’ll revert to the previous behavior (hopefully I can create a test to ensure it doesn’t regress), but will open a follow up issue about the above.