Skip to content

Commit 0abbfda

Browse files
Test.py returns 1 when a test fails (#60)
* test.py returns 1 on fail now * Add return values to the other return statements present in do_tests
1 parent b05da87 commit 0abbfda

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,11 @@ def do_tests():
332332

333333
if (len(binaries) == 0):
334334
print("No binaries to test")
335-
return
335+
return 1
336336

337337
if (len(expected) == 0):
338338
print("No expecteds to test against")
339-
return
339+
return 1
340340

341341
instances = []
342342

@@ -377,5 +377,7 @@ def do_tests():
377377
.format(total_pass, total_fail, len(instances)))
378378
print("See .got files for more details")
379379

380+
return 0 if total_fail == 0 else 1
381+
380382
if __name__ == "__main__":
381-
do_tests()
383+
sys.exit(do_tests())

0 commit comments

Comments
 (0)