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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -