Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit aebf8a7

Browse files
committed
Count test passes
1 parent 96b9116 commit aebf8a7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/test_scripts.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,24 @@
1919
os.chdir("..")
2020
if os.path.isfile(os.path.join("tests", filename)):
2121
#Already in the repository root directory
22-
base_path ="."
22+
base_path = "."
2323
else:
2424
sys.stderr.write("Should be in base folder or tests folder.\n")
2525
sys.exit(1)
2626

27+
2728
def check(script):
2829
"""Runs script and Will increment good, warn or errors."""
29-
global errors
30+
global good, warn, errors
3031
#TODO - Capture stderr, look for warnings
3132
#TODO - This assumes 'python' will be aliased as on TravisCI
3233
rc = os.system("python %s" % script)
3334
if rc:
3435
errors += 1
3536
sys.stderr.write("Return code %i from %s\n" % (rc, script))
37+
else:
38+
good += 1
39+
3640

3741
good = 0
3842
warn = 0
@@ -59,4 +63,3 @@ def check(script):
5963
sys.stderr.write("Test failed")
6064
sys.exit(1)
6165

62-

0 commit comments

Comments
 (0)