aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzczepan Zalega <szczepan@nitrokey.com>2019-01-18 11:42:30 +0100
committerSzczepan Zalega <szczepan@nitrokey.com>2019-01-26 21:13:09 +0100
commit908ae6af21e472e19110e0a17371a0c867d56cec (patch)
tree9551f9468ff9ff9b7069dae07899f299eb1f745f
parent876c432f7a581ea3839deb77f756166572ac1db7 (diff)
downloadlibnitrokey-908ae6af21e472e19110e0a17371a0c867d56cec.tar.gz
libnitrokey-908ae6af21e472e19110e0a17371a0c867d56cec.tar.bz2
Add FIXME comments. Make the skip() method descriptive.
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r--unittest/test_storage.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittest/test_storage.py b/unittest/test_storage.py
index 380d42e..472e2cf 100644
--- a/unittest/test_storage.py
+++ b/unittest/test_storage.py
@@ -407,15 +407,15 @@ def test_export_firmware_extended_fedora29(C):
"""
skip_if_device_version_lower_than({'S': 43})
- skip_if_not_fedora()
+ skip_if_not_fedora('Fedora specific test, due to the mount path. Could be suited for Debian.')
import pexpect
from time import sleep
import os
exist = os.path.exists
- device = '/dev/sde1'
- firmware_abs_path = '/run/media/sz/Nitrokey/firmware.bin'
+ device = '/dev/sde1' # FIXME autodetect the block device with udev
+ firmware_abs_path = '/run/media/sz/Nitrokey/firmware.bin' # FIXME use the actual user name in mount path
pexpect.run(f'udisksctl mount -b {device}')
checks = 0
checks_add = 0
@@ -448,12 +448,12 @@ def test_export_firmware_extended_fedora29(C):
assert checks_add == checks
-def skip_if_not_fedora():
+def skip_if_not_fedora(message:str) -> None:
import os
exist = os.path.exists
def skip():
- pytest.skip('Fedora specific test, due to the mount path. Could be suited for Debian.')
+ pytest.skip(message)
os_release_fp = '/etc/os-release'
if not exist(os_release_fp):