aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-01-15 13:48:49 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2019-01-15 13:48:49 +0100
commitc284da21d2eb9e9cbdc30cd82e9dd46ea4528683 (patch)
tree43ec0d2e1b2170d9eeb5fc5dddbb738d93643259
parentaa2778c5a4602137ee86db6c5fa9810b5c566b5d (diff)
downloadlibnitrokey-c284da21d2eb9e9cbdc30cd82e9dd46ea4528683.tar.gz
libnitrokey-c284da21d2eb9e9cbdc30cd82e9dd46ea4528683.tar.bz2
Use logger instead of bare printing
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--unittest/conftest.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/unittest/conftest.py b/unittest/conftest.py
index bf18fc8..ba21a38 100644
--- a/unittest/conftest.py
+++ b/unittest/conftest.py
@@ -21,10 +21,17 @@ SPDX-License-Identifier: LGPL-3.0
import pytest
-from misc import ffi
+from misc import ffi, gs
device_type = None
+from logging import getLogger, basicConfig, DEBUG
+
+basicConfig(format='* %(relativeCreated)6d %(filename)s:%(lineno)d %(message)s',level=DEBUG)
+log = getLogger('conftest')
+print = log.debug
+
+
def skip_if_device_version_lower_than(allowed_devices):
global device_type
model, version = device_type