aboutsummaryrefslogtreecommitdiff
path: root/unittest/conftest.py
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2020-01-28 14:45:34 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2020-02-26 12:26:20 +0100
commitec767410d860688f32ef644e9573841272d5aec2 (patch)
treefbe635a81160069ce077e1f76289d32a93e6d55d /unittest/conftest.py
parent73251ccf5abae5ae91f2aa962a29dce6fcc0e5e4 (diff)
downloadlibnitrokey-ec767410d860688f32ef644e9573841272d5aec2.tar.gz
libnitrokey-ec767410d860688f32ef644e9573841272d5aec2.tar.bz2
Skip bootloader activation unless specified by the switch
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