From 873833d777536de5aa716a509e590ad1b076198a Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Mon, 30 Nov 2020 20:10:59 +0200 Subject: [PATCH] Fix unit-test failing on disabled functions. --- scripts/examples/OpenMV/99-Tests/unittests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/examples/OpenMV/99-Tests/unittests.py b/scripts/examples/OpenMV/99-Tests/unittests.py index 233d668b5..af5b27119 100644 --- a/scripts/examples/OpenMV/99-Tests/unittests.py +++ b/scripts/examples/OpenMV/99-Tests/unittests.py @@ -28,8 +28,11 @@ for test in sorted(os.listdir(SCRIPT_DIR)): if unittest(DATA_DIR, TEMP_DIR) == False: raise Exception() except Exception as e: - test_failed = True - test_result = "DISABLED" if "unavailable" in str(e) else "FAILED" + if "unavailable" in str(e): + test_result = "DISABLED" + else: + test_failed = True + test_result = "FAILED" print_result(test, test_result) if test_failed: