-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config: fix the paths considered for initial conftest discovery #11125
config: fix the paths considered for initial conftest discovery #11125
Conversation
Will be reused in the next commit.
testing/test_collection.py
Outdated
result.stdout.fnmatch_lines( | ||
"INTERNALERROR* Exception: pytest_sessionstart hook successfully run" | ||
) | ||
|
||
# No fallback. | ||
result = pytester.runpytest('.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for taking care of this @bluetech! Great work.
Fixes pytest-dev#11104. See the issue for a description of the problem. Now, we use the same logic for initial conftest paths as we do for deciding the initial args, which was the idea behind checking `namespace.file_or_dir` and `testpaths` previously. This fixes the issue of `testpaths` being considered for initial conftests even when it's not used for the args. (Another issue in faeb161 was that the `testpaths` were not glob-expanded, this is also fixed.)
5530529
to
1489032
Compare
I think maybe we shouldn't backport this, it's a bit too big for that. Let's just do a 7.4 release instead. I'll open an issue. |
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
After pytest-dev/pytest#11125 being included in pytest==7.4, pytest can be unpinned.
Fixes #11104. See the commits; the first one is just a refactor.