Skip to content
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

Merged
merged 2 commits into from Jun 21, 2023

Conversation

bluetech
Copy link
Member

Fixes #11104. See the commits; the first one is just a refactor.

result.stdout.fnmatch_lines(
"INTERNALERROR* Exception: pytest_sessionstart hook successfully run"
)

# No fallback.
result = pytester.runpytest('.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@nicoddemus nicoddemus left a 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.)
@bluetech bluetech force-pushed the initial-conftests-testpaths branch from 5530529 to 1489032 Compare June 21, 2023 06:02
@bluetech bluetech enabled auto-merge June 21, 2023 06:02
@bluetech
Copy link
Member Author

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.

@bluetech bluetech merged commit faa1f9d into pytest-dev:main Jun 21, 2023
27 checks passed
@bluetech bluetech deleted the initial-conftests-testpaths branch June 21, 2023 06:25
@nicoddemus nicoddemus mentioned this pull request Jun 21, 2023
5 tasks
aciba90 added a commit to aciba90/cloud-init that referenced this pull request Oct 24, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
aciba90 added a commit to aciba90/cloud-init that referenced this pull request Oct 24, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
blackboxsw pushed a commit to canonical/cloud-init that referenced this pull request Oct 25, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
holmanb pushed a commit to holmanb/cloud-init that referenced this pull request Oct 31, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
blackboxsw pushed a commit to canonical/cloud-init that referenced this pull request Nov 2, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
blackboxsw pushed a commit to blackboxsw/cloud-init that referenced this pull request Nov 6, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
holmanb pushed a commit to canonical/cloud-init that referenced this pull request Nov 14, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
holmanb pushed a commit to canonical/cloud-init that referenced this pull request Nov 14, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
holmanb pushed a commit to canonical/cloud-init that referenced this pull request Nov 14, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
holmanb pushed a commit to canonical/cloud-init that referenced this pull request Nov 14, 2023
After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pytest 7.3.2 changes in behaviour regarding conftest.py and testpaths
2 participants