Skip to content

Implemented solution to issue #441 and added test cases - #461

Closed
vishutupili wants to merge 4 commits into
pytest-dev:mainfrom
vishutupili:main
Closed

vishutupili wants to merge 4 commits into
pytest-dev:mainfrom
vishutupili:main

Conversation

@vishutupili

Copy link
Copy Markdown

This PR is addressing issue #441

We have implemented the suggested change to the while loop condition.

Additionally, we have added test cases to test the order of hooks called to make sure that changing the while loop condition did not change the correct behaviour that the previous code was producing (specifically when hookwrapper and wrapper are set to False).

@vishutupili vishutupili changed the title Implemented #441 and added test cases Implemented Issue #441 and added test cases Dec 14, 2023
@vishutupili vishutupili changed the title Implemented Issue #441 and added test cases Implemented solution to issue #441 and added test cases Dec 14, 2023
Comment thread src/pluggy/_hooks.py
i >= 0
and hookimpls[i].tryfirst
and not (hookimpls[i].hookwrapper or hookimpls[i].wrapper)
while i >= 0 and (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

while just taking a look at line 531 it seems that #441 was incomplete as the specifically chosen arguments in the body of the method currently exclude the desired behavior as they intentional

cc @smarie

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@RonnyPfannschmidt not sure I get your point here. Do you mean that additional tests should be implemented in this PR to cover another situation ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No,what I meant is that based on the preceding code, the desired feature was intentionally unsupported and we need to do some design work to ensure its supported correctly instead of just enabling it

@bluetech

Copy link
Copy Markdown
Member

Hi @vishutupili, the tests you added are passing also in current main. Can you add some tests the fail before the change and pass after?

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.

5 participants