Fix unit-test failing on disabled functions.

This commit is contained in:
iabdalkader 2020-11-30 20:10:59 +02:00
parent 4e4a2ba1ca
commit 873833d777

View File

@ -28,8 +28,11 @@ for test in sorted(os.listdir(SCRIPT_DIR)):
if unittest(DATA_DIR, TEMP_DIR) == False: if unittest(DATA_DIR, TEMP_DIR) == False:
raise Exception() raise Exception()
except Exception as e: except Exception as e:
if "unavailable" in str(e):
test_result = "DISABLED"
else:
test_failed = True test_failed = True
test_result = "DISABLED" if "unavailable" in str(e) else "FAILED" test_result = "FAILED"
print_result(test, test_result) print_result(test, test_result)
if test_failed: if test_failed: