There is the overview in pytest after running the test:
============= 7 passed in 1.11 seconds ============
I like to access the time (here the 1.11) in the end of pytest.
some helpful information I found already here:
How can I access the overall test result of a pytest test run during runtime?
But did not match the overall test run time.
I tried to use the def pytest_sessionfinish(session, exitstatus)
I did not find the overall duration there.
It looks like the value is inside the RunResult object. https://docs.pytest.org/en/latest/_modules/_pytest/pytester.html#RunResult
How to access?
Aucun commentaire:
Enregistrer un commentaire