Debian Codegraph @

dev/tools/run_tests_standalone.py

raw
1 '''
2 Run all the standalone tests using pytest. Exits with error code 1 if a test failed.
3 '''
4 import sys
5
6 import brian2
7
8 if __name__ == '__main__':
9 if len(sys.argv) > 1 and sys.argv[1] == 'no-parallel':
10 if not brian2.test([], test_codegen_independent=False,
11 test_standalone='cpp_standalone',
12 test_in_parallel=[]): # If the test fails, exit with a non-zero error code
13 sys.exit(1)
14 else:
15 if not brian2.test([], test_codegen_independent=False,
16 test_standalone='cpp_standalone'): # If the test fails, exit with a non-zero error code
17 sys.exit(1)
18 0