Skip to content

Instantly share code, notes, and snippets.

View maropu's full-sized avatar
🌴
On vacation

Takeshi Yamamuro maropu

🌴
On vacation
View GitHub Profile
@pytest.hookimpl(hookwrapper=True)
def pytest_report_teststatus(report, config):
outcome = yield
res = outcome.get_result()
attr_name = "___TIME___"
if report.when == "setup":
# HACK: store the start time in `config`
setattr(config, attr_name, time.time())
elif report.when == "call":