aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unittest/conftest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/unittest/conftest.py b/unittest/conftest.py
index 26536cf..49f1502 100644
--- a/unittest/conftest.py
+++ b/unittest/conftest.py
@@ -34,7 +34,7 @@ def skip_if_device_version_lower_than(allowed_devices):
@pytest.fixture(scope="module")
-def C(request):
+def C(request=None):
fp = '../NK_C_API.h'
declarations = []
@@ -99,7 +99,8 @@ def C(request):
C.NK_logout()
print('Finished')
- request.addfinalizer(fin)
+ if request:
+ request.addfinalizer(fin)
# C.NK_set_debug(True)
C.NK_set_debug_level(int(os.environ.get('LIBNK_DEBUG', 3)))