yield_fixture to get test TestReport after yield #12180
Unanswered
parkhomchukp
asked this question in
Ideas
Replies: 1 comment 2 replies
-
Based on the observation that people often ask for this for the wrong reason I request details on the actual use case/intent |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In hooks like pytest_runtest_makereport we can easily get the outcome of the test. For example:
Then we can do some steps based on the test result.
It would be nice to have such a possibility in yield_fixtures. Code after yield is executed after the test is complete, so seems like it's possible to get a TestReport inside a fixture.
Example:
Beta Was this translation helpful? Give feedback.
All reactions