From 718d589acc4af6de844e8a633ff2d69afa5a0cf7 Mon Sep 17 00:00:00 2001 From: matejcik Date: Thu, 10 Dec 2020 10:37:02 +0100 Subject: [PATCH] feat(tests): dump UI test report as you go --- tests/conftest.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index a8e2ed34f..afcbe1c41 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -260,6 +260,15 @@ def pytest_runtest_setup(item): pytest.skip("Skipping altcoin test") +def pytest_runtest_teardown(item): + """Called after a test item finishes. + + Dumps the current UI test report HTML. + """ + if item.session.config.getoption("ui") == "test": + testreport.index() + + @pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): # Make test results available in fixtures.