You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there!
I'm trying to understand to behavior of the pytest_report_teststatus hook, because in my environment (which does not seem to be that different from what I can see on the internet) I'm getting it called twice for each of the steps in setup, teardown and call.
I tried to run in another project written from scratch, so below is what I hope to be a clear explanation of what I have found so far.
As you can see, the pytest_report_teststatus is now called twice for each step.
Which causes me a problem as I want to submit tests results to another tool (using a HTTP request), so I'm getting two results for one test (whatever the result).
Thank you a lot in advance for the attention you can bring to this and help me fix it, or find a workaround.
Cheers,
Brice
The text was updated successfully, but these errors were encountered:
Hi there!
I'm trying to understand to behavior of the
pytest_report_teststatus
hook, because in my environment (which does not seem to be that different from what I can see on the internet) I'm getting it called twice for each of the steps in setup, teardown and call.I tried to run in another project written from scratch, so below is what I hope to be a clear explanation of what I have found so far.
I have the following code in my
conftest.py
file:Then I have 3 tests files as below:
tests_script1.py:
tests_script2.py:
tests_script3.py:
If I run the command
pytest -s
in this folder, I'm getting the following result:Now if I edit the conftest.py file and add the following hook with the line that activates the json report plugin:
and then run the command again, I get the following output:
As you can see, the
pytest_report_teststatus
is now called twice for each step.Which causes me a problem as I want to submit tests results to another tool (using a HTTP request), so I'm getting two results for one test (whatever the result).
Thank you a lot in advance for the attention you can bring to this and help me fix it, or find a workaround.
Cheers,
Brice
The text was updated successfully, but these errors were encountered: