diff options
Diffstat (limited to 'test/conftest.py')
-rw-r--r-- | test/conftest.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/conftest.py b/test/conftest.py index 3edc471d..8ca8c1d3 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -17,6 +17,7 @@ import pytest from unit.check.go import check_go from unit.check.node import check_node from unit.check.tls import check_openssl +from unit.option import option def pytest_addoption(parser): @@ -48,12 +49,14 @@ def pytest_addoption(parser): unit_instance = {} _processes = [] -option = None - def pytest_configure(config): - global option - option = config.option + option.config = config.option + + option.detailed = config.option.detailed + option.print_log = config.option.print_log + option.save_log = config.option.save_log + option.unsafe = config.option.unsafe option.generated_tests = {} option.current_dir = os.path.abspath( @@ -162,6 +165,8 @@ def pytest_sessionstart(session): unit_stop() + _check_alerts() + shutil.rmtree(unit_instance['temp_dir']) |