-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Use session.config.hook instead of ihook. Fixes #2124 #2127
Merged
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
522d59e
Use session.config.hook instead of ihook. Fixes #2124
malinoff a63b34c
Switch to item fspath
malinoff 14b6380
Fix #2775 - running pytest with "--pyargs" will result in Items with …
794d458
Remove unnecessary complexity in _check_initialpaths_for_relpath().
76f3be4
remove unused _pytest.runner.NodeInfo class
RonnyPfannschmidt 742f9cb
Merge pull request #2911 from RonnyPfannschmidt/remove-nodeinfo
nicoddemus f320686
Make SubRequest.addfinalizer an explicit method
nicoddemus b671c5a
Merge pull request #2914 from nicoddemus/addfinalizer-refactor
RonnyPfannschmidt f0f2d2b
Merge branch 'master' into fix-missing-nodeid-with-pyargs
RonnyPfannschmidt 259b86b
Merge pull request #2776 from cryporchild/fix-missing-nodeid-with-pyargs
nicoddemus 258031a
Merge remote-tracking branch 'upstream/master' into malinoff/fix-2124
nicoddemus 6550b99
pytest_fixture_post_finalizer now receives a request argument
nicoddemus f074fd9
Merge remote-tracking branch 'upstream/features' into malinoff/fix-2124
nicoddemus 063335a
Add changelog entries for #2124
nicoddemus bdad345
Fix passing request to finish() in FixtureDef
nicoddemus 6d3fe0b
Explicitly clear finalizers list in finalize to ensure cleanup
nicoddemus a6f2d2d
Rename FixtureDef.finalizer to FixtureDef.finalizers
nicoddemus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
as far as i understand, at this place, config.hook is an incorrect choice, as it does not apply fs path filtering
@hpk42 please cross-check my concern
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.
Shouldn't then
session.gethookproxy(fspath)
be used here instead?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.
@nicoddemus i think so
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.
@nicoddemus @RonnyPfannschmidt I disagree -
session.gethookproxy(fspath)
is specifically what I'm changing in this PR, becausesession.ihook
does preciselysession.gethookproxy(self.fspath)
(https://github.com/pytest-dev/pytest/blob/master/_pytest/main.py#L267-L270) and it doesn't work.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.
Session.fspath is indeeed broken, you need the item fspath, which has a different value