python - How can I determine if a test passed or failed by examining the Item object passed to the pytest_runtest_teardown? -
python - How can I determine if a test passed or failed by examining the Item object passed to the pytest_runtest_teardown? -
pytest allows hook teardown phase each test implementing function called pytest_runtest_teardown in plugin:
def pytest_runtest_teardown(item, nextitem): pass is there attribute or method on item can utilize determine whether test finished running passed or failed? couldn't find documentation pytest.item , hunting through source code , playing around in ipdb didn't reveal obvious.
python py.test
Comments
Post a Comment