pytest_runtest_protocol hook not hit for tests marked with pytest.mark.flaky
#11509
-
Hi! I am working on a pytest plugin and I am getting an unexpected behavior. For the following test I cannot get the hook test that isn't working with the hook
test that is working with the hook
(these tests are from the same file) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Due to lack of information, there's nothing actionable The hook is called on all items |
Beta Was this translation helpful? Give feedback.
-
@eleanorjboyd you mean the flaky marker from https://github.com/box/flaky? That plugin overwrites the Depending on how your own plugin is getting installed, You might try to use a hookwrapper instead. |
Beta Was this translation helpful? Give feedback.
-
Hello! Sorry for the lack of information. The additional library was actually |
Beta Was this translation helpful? Give feedback.
@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, givenpytest_runtest_protocol
is meant to be unique.You might try to use a hookwrapper instead.