Don't run core Python tests on CircleCI

This commit is contained in:
Michael Droettboom 2018-06-24 12:05:21 -04:00
parent d562ed9744
commit d9b74e0571
2 changed files with 24 additions and 21 deletions

View File

@ -25,14 +25,16 @@ def run_native(hostpython, code):
def run_wasm(code):
s = conftest.SeleniumWrapper()
s.load_package('numpy')
s.run(code)
try:
runtime = float(s.logs[-1])
except ValueError:
print('\n'.join(s.logs))
raise
s.driver.quit()
s.load_package('numpy')
s.run(code)
try:
runtime = float(s.logs[-1])
except ValueError:
print('\n'.join(s.logs))
raise
finally:
s.driver.quit()
return runtime

View File

@ -171,18 +171,19 @@ def test_run_core_python_test(python_test, selenium):
def pytest_generate_tests(metafunc):
if 'python_test' in metafunc.fixturenames:
test_modules = []
with open(
str(pathlib.Path(__file__).parents[0] /
"python_tests.txt")) as fp:
for line in fp:
line = line.strip()
if line.startswith('#'):
continue
parts = line.split()
if len(parts) == 1:
test_modules.append(parts[0])
# XXX: The tests take too long to run, so we're just doing
# a sanity check on the first 25
if 'TRAVIS' in os.environ and len(test_modules) > 25:
break
if 'CIRCLECI' not in os.environ:
with open(
str(pathlib.Path(__file__).parents[0] /
"python_tests.txt")) as fp:
for line in fp:
line = line.strip()
if line.startswith('#'):
continue
parts = line.split()
if len(parts) == 1:
test_modules.append(parts[0])
# XXX: The tests take too long to run, so we're just doing
# a sanity check on the first 25
if 'TRAVIS' in os.environ and len(test_modules) > 25:
break
metafunc.parametrize("python_test", test_modules)