Skip to content

pytest_runtest_protocol hook not hit for tests marked with pytest.mark.flaky #11509

Closed Answered by nicoddemus
eleanorjboyd asked this question in Q&A
Discussion options

You must be logged in to vote

@eleanorjboyd you mean the flaky marker from https://github.com/box/flaky?

That plugin overwrites the pytest_runtest_protocol:

https://github.com/box/flaky/blob/69c297e516846257dda83d3b57f6618dc6f1d4dc/flaky/flaky_pytest_plugin.py#L51

Depending on how your own plugin is getting installed, flaky might be getting called instead of yours, given pytest_runtest_protocol is meant to be unique.

You might try to use a hookwrapper instead.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nicoddemus
Comment options

You must be logged in to vote
2 replies
@nicoddemus
Comment options

@eleanorjboyd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants