Turn the Travis CI test skipping mechanism into something more generic
This commit is contained in:
parent
88b11b50e5
commit
047db2299c
|
@ -27,16 +27,17 @@ def run_tests(pyb, tests):
|
||||||
failed_tests = []
|
failed_tests = []
|
||||||
skipped_tests = []
|
skipped_tests = []
|
||||||
|
|
||||||
running_under_travis = os.getenv('TRAVIS') == 'true'
|
skip_tests = set()
|
||||||
|
|
||||||
# Set of tests that we shouldn't run under Travis CI
|
# Some tests shouldn't be run under Travis CI
|
||||||
skip_travis_tests = set(['basics/memoryerror.py'])
|
if os.getenv('TRAVIS') == 'true':
|
||||||
|
skip_tests.add('basics/memoryerror.py')
|
||||||
|
|
||||||
for test_file in tests:
|
for test_file in tests:
|
||||||
test_basename = os.path.basename(test_file)
|
test_basename = os.path.basename(test_file)
|
||||||
test_name = os.path.splitext(test_basename)[0]
|
test_name = os.path.splitext(test_basename)[0]
|
||||||
|
|
||||||
if running_under_travis and test_file in skip_travis_tests:
|
if test_file in skip_tests:
|
||||||
print("skip ", test_file)
|
print("skip ", test_file)
|
||||||
skipped_tests.append(test_name)
|
skipped_tests.append(test_name)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue