Belle II Software development
basf2_args.py
1#!/usr/bin/env python3
2
3
10
11import basf2
12import b2test_utils
13import subprocess
14import os
15
16# disable pager when running these interactively
17os.environ['PAGER'] = "cat"
18
19success = [
20 ['--info'],
21 ['--version'],
22 ['--help'],
23 ['-m', 'RootOutput'],
24 ['--dry-run', 'root_input.py', '-i', 'miep.root'],
25 ['--dry-run', 'root_input.py'],
26]
27error = [
28 ['-m', 'NonExistingModule'],
29 ['--thisdoesntexist'],
30 ['/this/path/doesnt/exist.py'],
31 ['h͌̉e̳̞̞͆ͨ̏͋̕c͟o͛҉̟̰̫͔̟̪̠m̴̀ͯ̿͌ͨ̃͆e̡̦̦͖̳͉̗ͨͬ̑͌̃ͅt̰̝͈͚͍̳͇͌h̭̜̙̦̣̓̌̃̓̀̉͜'],
32]
33
34test_dir = basf2.find_file("/framework/tests")
36 for arguments in success:
37 assert 0 == subprocess.run(['basf2'] + arguments).returncode
38
39 for arguments in error:
40 assert 0 != subprocess.run(['basf2'] + arguments).returncode
def working_directory(path)
Definition: __init__.py:170