make --durations also show the execution times of setup/teardown calls. This requires a slight incompatibility - pytest_runtest_logreport now sees setup/teardown reports even if the tests passed.

This commit is contained in:
holger krekel
2011-11-08 17:53:46 +00:00
parent 3b9fd3abd8
commit 29bf205f3a
12 changed files with 70 additions and 16 deletions

View File

@@ -63,6 +63,8 @@ class ResultLog(object):
self.write_log_entry(testpath, lettercode, longrepr)
def pytest_runtest_logreport(self, report):
if report.when != "call" and report.passed:
return
res = self.config.hook.pytest_report_teststatus(report=report)
code = res[1]
if code == 'x':