From cf32902131d4f7bd68622ca9d243fdff5a5ed519 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sun, 13 Jan 2019 12:05:55 +0100 Subject: Add simple test for NK_list_devices Unfortunately, I cannot test more as the current ffi implementation does not allow me to import struct definitions. Without the definition for the NK_device_info struct, I cannot inspect the result of the NK_list_devices function. --- unittest/test_multiple.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/unittest/test_multiple.py b/unittest/test_multiple.py index 3f1d2d5..902234f 100644 --- a/unittest/test_multiple.py +++ b/unittest/test_multiple.py @@ -29,11 +29,19 @@ from tqdm import tqdm from conftest import skip_if_device_version_lower_than from constants import DefaultPasswords, DeviceErrorCode, bb -from misc import gs, wait +from misc import gs, wait, ffi pprint = pprint.PrettyPrinter(indent=4).pprint +@pytest.mark.other +@pytest.mark.info +def test_list_devices(C): + infos = C.NK_list_devices() + assert infos != ffi.NULL + C.NK_free_device_info(infos) + + @pytest.mark.other @pytest.mark.info def test_get_status_storage_multiple(C): -- cgit v1.2.1