diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2020-09-22 00:29:52 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2020-09-22 00:29:52 +0200 |
commit | acc46559806f65e55d5d00946dab351f3dddfca5 (patch) | |
tree | 9bc285399ad03271dd7040fafb6d22d40964901e | |
parent | 61bcd3c68353f36b3754b1d3a66a746f5611ddde (diff) | |
download | libnitrokey-ext-issue-storage-98.tar.gz libnitrokey-ext-issue-storage-98.tar.bz2 |
Add more countersext-issue-storage-98
-rw-r--r-- | unittest/test_storage_issue98.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/unittest/test_storage_issue98.py b/unittest/test_storage_issue98.py index fd90803..3448e94 100644 --- a/unittest/test_storage_issue98.py +++ b/unittest/test_storage_issue98.py @@ -62,12 +62,13 @@ def test_data_lost(C): iterations = 0 failed = [] + errcnt = 0 while True: iterations += 1 - print(f"*** Starting iteration {iterations} (failed [{len(failed)}]{failed})") + print(f"*** Starting iteration {iterations} (failed {errcnt} [{len(failed)}]{failed})") for cmd_i , c in enumerate(commands): - assert c() == DeviceErrorCode.STATUS_OK + errcnt += 0 if c() == DeviceErrorCode.STATUS_OK else 1 my_sleep(1) reinsert() @@ -79,7 +80,7 @@ def test_data_lost(C): print("".center(80, "*")) print("".center(80, "*")) my_sleep(3) - failed += cmd_i + failed.append(cmd_i) # print(f"Status: {get_status(C)}") assert C.NK_lock_device() == DeviceErrorCode.STATUS_OK my_sleep(1) |