Skip to content

Commit

Permalink
Do not fail in the absence of "standalone-only" tests
Browse files Browse the repository at this point in the history
This made brian2genn's test suite marked as fail
  • Loading branch information
mstimberg committed Apr 6, 2020
1 parent 0681968 commit 52e49e6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions brian2/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def run(codegen_targets=None, long_tests=False, test_codegen_independent=True,
if test_standalone in test_in_parallel:
argv.extend(multiprocess_arguments)
success.append(pytest.main(argv + additional_args,
plugins=[pref_plugin]) == 0)
plugins=[pref_plugin]) in [0, 5])
clear_caches()

reset_device()
Expand All @@ -364,7 +364,7 @@ def run(codegen_targets=None, long_tests=False, test_codegen_independent=True,
if test_standalone in test_in_parallel:
argv.extend(multiprocess_arguments)
success.append(pytest.main(argv + additional_args,
plugins=[pref_plugin]) == 0)
plugins=[pref_plugin]) in [0, 5])
clear_caches()
reset_device()

Expand All @@ -380,7 +380,7 @@ def run(codegen_targets=None, long_tests=False, test_codegen_independent=True,
argv = make_argv(dirnames,
'standalone_compatible' + markers)
success.append(pytest.main(argv + additional_args,
plugins=[pref_plugin]) == 0)
plugins=[pref_plugin]) in [0, 5])
clear_caches()
reset_device()

Expand All @@ -394,7 +394,7 @@ def run(codegen_targets=None, long_tests=False, test_codegen_independent=True,
argv = make_argv(dirnames,
'standalone_compatible' + markers)
success.append(pytest.main(argv + additional_args,
plugins=[pref_plugin]) == 0)
plugins=[pref_plugin]) in [0, 5])
clear_caches()
prefs['devices.cpp_standalone.openmp_threads'] = 0

Expand All @@ -406,7 +406,7 @@ def run(codegen_targets=None, long_tests=False, test_codegen_independent=True,
if test_standalone in test_in_parallel:
argv.extend(multiprocess_arguments)
success.append(pytest.main(argv + additional_args,
plugins=[pref_plugin]) == 0)
plugins=[pref_plugin]) in [0, 5])
clear_caches()

all_success = all(success)
Expand Down

0 comments on commit 52e49e6

Please sign in to comment.