Skipped tests have different phases depending on if skip is implemented with pytest.mark.skip decorator, or skipped in the test with pytest.skip #9814
-
I have two different tests that implement skipping in different ways:
What I notice is that only the 'setup' and 'teardown' phases exist if a test is skipped with the Is there any specific reason for this difference in behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I guess in order to hit the skip the test item is actually executed so having a 'call' phase seems alright for that use case, a test could fail before the skip for example and only skip under some logic. |
Beta Was this translation helpful? Give feedback.
-
It's behaviour as expected, the call phase only happens when the setup passes |
Beta Was this translation helpful? Give feedback.
It's behaviour as expected, the call phase only happens when the setup passes