-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Backport 5.4] Merge pull request #6991 from blueyed/fix-lf-cmdline-args-upstream #7219
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
Conversation
@@ -0,0 +1 @@ | |||
Collected files are displayed after any reports from hooks, e.g. the status from ``--lf``. |
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.
Maybe we should drop this change from the backport? (the changes in src/_pytest/terminal.py
)
x | ||
for x in result | ||
if x.nodeid in lastfailed | ||
# Include any passed arguments (not trivial to filter). |
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.
This one makes sense.
if x.nodeid in lastfailed | ||
# Include any passed arguments (not trivial to filter). | ||
or session.isinitpath(x.fspath) | ||
# Keep all sub-collectors. |
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.
But I don't really understand this one, would you mind explaining what it does?
def pytest_collection_modifyitems( | ||
self, config: Config, items: List[nodes.Item] | ||
) -> Generator[None, None, None]: | ||
yield |
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.
Why is this change (and in pytest_collection_modifyitems
) needed?
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.
i believe this is to ensure the actual code runs as late as possible
in this case this means, its running after most normal hook-wrappers finish (only the last bit of a earlier hook-wrapper could interact with it after that
Closing for now, not sure we will see a 5.4.X before 6.0 anyway. |
Backport of #6991
But I'm not so sure we should backport this, because it also contains an improvement (albeit small).