From 908ae6af21e472e19110e0a17371a0c867d56cec Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 18 Jan 2019 11:42:30 +0100 Subject: Add FIXME comments. Make the skip() method descriptive. Signed-off-by: Szczepan Zalega --- unittest/test_storage.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'unittest') 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): -- cgit v1.2.3