From acc46559806f65e55d5d00946dab351f3dddfca5 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Tue, 22 Sep 2020 00:29:52 +0200 Subject: Add more counters --- unittest/test_storage_issue98.py | 7 ++++--- 1 file 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) -- cgit v1.2.3