Skip to content

Commit b56a53d

Browse files
committed
Merge pull request adafruit#667 from Rosuav/testfixes
A couple of small fixes to run-tests
2 parents 8c75bd2 + 047db22 commit b56a53d

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

tests/run-tests

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ def run_tests(pyb, tests):
2727
failed_tests = []
2828
skipped_tests = []
2929

30-
running_under_travis = os.getenv('TRAVIS') == 'true'
30+
skip_tests = set()
3131

32-
# Set of tests that we shouldn't run under Travis CI
33-
skip_travis_tests = set(['basics/memoryerror.py'])
32+
# Some tests shouldn't be run under Travis CI
33+
if os.getenv('TRAVIS') == 'true':
34+
skip_tests.add('basics/memoryerror.py')
3435

3536
for test_file in tests:
36-
if running_under_travis and test_file in skip_travis_tests:
37+
test_basename = os.path.basename(test_file)
38+
test_name = os.path.splitext(test_basename)[0]
39+
40+
if test_file in skip_tests:
3741
print("skip ", test_file)
3842
skipped_tests.append(test_name)
3943
continue
@@ -68,9 +72,6 @@ def run_tests(pyb, tests):
6872
except pyboard.PyboardError:
6973
output_mupy = b'CRASH'
7074

71-
test_basename = os.path.basename(test_file)
72-
test_name = os.path.splitext(test_basename)[0]
73-
7475
if output_mupy == b'SKIP\n':
7576
print("skip ", test_file)
7677
skipped_tests.append(test_name)

0 commit comments

Comments
 (0)