summaryrefslogtreecommitdiffhomepage
path: root/test/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/conftest.py b/test/conftest.py
index 982e43c9..6783f16d 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -74,10 +74,6 @@ def pytest_configure(config):
fcntl.fcntl(sys.stdout.fileno(), fcntl.F_SETFL, 0)
-def skip_alert(*alerts):
- option.skip_alerts.extend(alerts)
-
-
def pytest_generate_tests(metafunc):
cls = metafunc.cls
if (not hasattr(cls, 'application_type')
@@ -314,7 +310,7 @@ def _check_alerts(path=None):
alerts = re.findall(r'.+\[alert\].+', log)
if alerts:
- print('All alerts/sanitizer errors found in log:')
+ print('\nAll alerts/sanitizer errors found in log:')
[print(alert) for alert in alerts]
found = True
@@ -378,6 +374,14 @@ def stop_processes():
return 'Fail to stop process(es)'
+@pytest.fixture()
+def skip_alert():
+ def _skip(*alerts):
+ option.skip_alerts.extend(alerts)
+
+ return _skip
+
+
@pytest.fixture
def temp_dir(request):
return unit_instance['temp_dir']