aboutsummaryrefslogtreecommitdiff
path: root/unittest/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/conftest.py')
-rw-r--r--unittest/conftest.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittest/conftest.py b/unittest/conftest.py
index 49b4f02..1377e50 100644
--- a/unittest/conftest.py
+++ b/unittest/conftest.py
@@ -155,3 +155,11 @@ def get_library(request, allow_offline=False):
return AttrProxy(C, "libnitrokey C")
+
+def pytest_addoption(parser):
+ parser.addoption("--run-skipped", action="store_true",
+ help="run the tests skipped by default, e.g. adding side effects")
+
+def pytest_runtest_setup(item):
+ if 'skip_by_default' in item.keywords and not item.config.getoption("--run-skipped"):
+ pytest.skip("need --run-skipped option to run this test") \ No newline at end of file