Skip to content

Commit 047db22

Browse files
committed
Turn the Travis CI test skipping mechanism into something more generic
1 parent 88b11b5 commit 047db22

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/run-tests

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +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:
3637
test_basename = os.path.basename(test_file)
3738
test_name = os.path.splitext(test_basename)[0]
3839

39-
if running_under_travis and test_file in skip_travis_tests:
40+
if test_file in skip_tests:
4041
print("skip ", test_file)
4142
skipped_tests.append(test_name)
4243
continue

0 commit comments

Comments
 (0)