Debian Codegraph @

dev/tools/run_tests_long_and_standalone.py

raw
1 import sys
2
3 import brian2
4 import numpy as np
5
6 # Run tests for float32 and float64
7 success = [brian2.test(long_tests=True, test_standalone='cpp_standalone', float_dtype=np.float32),
8 brian2.test(long_tests=True, test_standalone='cpp_standalone', float_dtype=np.float64)]
9
10 result = ['Tests for {} dtype: {}'.format(dtype,
11 'passed' if status else 'FAILED')
12 for status, dtype in zip(success, ['float32', 'float64'])]
13 print('\t--\t'.join(result))
14
15 if all(success):
16 print('OK: All tests passed successfully')
17 else:
18 print('FAILED: Not all tests passed successfully (see above)')
19 sys.exit(1)