Belle II Software
development
test_b2help_decay.py
1
8
9
import
subprocess
10
import
shlex
11
12
13
def
call_command(command):
14
"""Call command print output after having removed some lines from output
15
16
Args:
17
command (string): command to be called
18
"""
19
output = subprocess.check_output(shlex.split(command), encoding=
'utf-8'
).strip().split(
'\n'
)
20
return
output
21
22
23
if
__name__ ==
'__main__'
:
24
output = call_command(
'b2help-decay print 1111440100'
)
25
assert
len(output) > 10
26
output = call_command(
'b2help-decay print 1111440100.dec'
)
27
assert
len(output) > 10
28
output = call_command(
'b2help-decay find K_S0 J/psi B0'
)
29
assert
len(output) > 10
30
output = call_command(
'b2help-decay find K_S0 J/psi -m B0 -b'
)
31
assert
len(output) > 2
decfiles
tests
test_b2help_decay.py
Generated on Mon Sep 1 2025 02:49:39 for Belle II Software by
1.13.2