diff --git a/tests/conftest.py b/tests/conftest.py index fd6169d024ffa19754991faaa191fe22442d9af5..e69605b78b7dbf4c54d37a9dc85cff51eb2b21e9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ import pytest +from forge_cfg import world def pytest_runtest_setup(item): @@ -13,15 +14,16 @@ def pytest_runtest_teardown(item, nextitem): def pytest_runtest_logstart(nodeid, location): - banner = '\n\n************ START %s ' % nodeid + banner = f'\n\n************ START #{world.test_count} {nodeid} ' banner += '*' * (140 - len(banner)) banner += '\n' banner = '\u001b[36m' + banner + '\u001b[0m' print(banner) + world.test_count += 1 def pytest_runtest_logfinish(nodeid, location): - banner = '\n************ END %s ' % nodeid + banner = f'\n************ END {nodeid} ' banner += '*' * (140 - len(banner)) banner = '\u001b[36;1m' + banner + '\u001b[0m' print(banner) diff --git a/tests/forge_cfg.py b/tests/forge_cfg.py index 127b6e1972b0195115fb463ffdddc3cfb8585b0d..d0b7e3607fddebdf0ab437f32007fe3e8f96dd0a 100644 --- a/tests/forge_cfg.py +++ b/tests/forge_cfg.py @@ -248,11 +248,10 @@ class ForgeConfiguration: return self.data_join('kea-leases%s.csv' % proto[1]) - - # global object that stores all needed data: configs, etc. world = threading.local() world.f_cfg = ForgeConfiguration() +world.test_count = 1 def _conv_arg_to_txt(arg):