Result Outcomes Regarding Skipped Tests #11193
Unanswered
eleanorjboyd
asked this question in
Q&A
Replies: 1 comment
-
You might wanna look at the ie:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am working on gathering the results of tests so I can display them to the users. I currently have my plugin configured to hook into pytest via
pytest_runtest_logreport(report)
but am running into an issue with skip tests. I am have two configurations of skip tests shown below. I wanted to find a consistent way to report which tests were skipped. I know since these tests are skipped thenreport.when == "call"
will not be called instead justreport.when == "setup" and "teardown"
. I was observing the values of skipped tests in these two states and got a bit confused. I am seeing that during "setup" the value ofreport.skipped == true
andreport.outcome == skipped
but then during "takedown" the values arereport.skipped == false
andreport.outcome == passed
. What is the reasoning behind this? If I want a consistent place to mark each test with the following literaloutcome: Literal["success", "failure", "skipped"]
what is the best pytest hook andreport.when
to do this at?Thank you!
Beta Was this translation helpful? Give feedback.
All reactions