Created
September 23, 2021 19:27
-
-
Save cjolowicz/5d282d0983f315ac1f2985efa5d9ee12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import pytest | |
@pytest.hookimpl(hookwrapper=True) | |
def pytest_fixture_setup(fixturedef, request): | |
start = time.time() | |
yield | |
total = time.time() - start | |
with open("/tmp/log", "a") as io: | |
print(f"{total:.2f} {fixturedef.argname}", file=io) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment