|
def | _check_list (self, std_function=stdV0s.stdKshorts, expected_modules=["ParticleLoader", "ParticleListManipulator", "TreeFitter", "ParticleSelector", "ParticleLoader", "ParticleCombiner", "TreeFitter", "ParticleSelector", "ParticleListManipulator"], expected_lists=['V0', 'V0_MassWindow', 'all', 'RD', 'merged']) |
|
Test case for standard V0 lists
Definition at line 17 of file test_std_v0.py.
◆ _check_list()
def _check_list |
( |
|
self, |
|
|
|
std_function = stdV0s.stdKshorts , |
|
|
|
expected_modules = [
"ParticleLoader",
"ParticleListManipulator",
"TreeFitter",
"ParticleSelector",
"ParticleLoader",
"ParticleCombiner",
"TreeFitter",
"ParticleSelector",
"ParticleListManipulator"] , |
|
|
|
expected_lists = ['V0', 'V0_MassWindow', 'all', 'RD', 'merged'] |
|
) |
| |
|
private |
check that a given function works
Definition at line 20 of file test_std_v0.py.
33 expected_lists=[
'V0',
'V0_MassWindow',
'all',
'RD',
'merged']):
34 """check that a given function works"""
35 testpath = create_path()
36 std_function(path=testpath)
40 len(testpath.modules()), len(expected_modules),
41 "Function %s does not load the expected number of modules" % (std_function.__name__))
46 for module
in testpath.modules():
47 loaded_modules.append(module.type())
48 for param
in module.available_params():
49 if module.type() ==
'ParticleLoader' and param.name ==
'decayStrings':
50 name = param.values[0].split(
':')[1].split(
' -> ')[0]
51 built_lists.append(name)
52 if module.type() ==
'ParticleListManipulator' and param.name ==
'outputListName':
53 name = str(param.values).split(
':')[1].split(
' -> ')[0]
54 built_lists.append(name)
55 if module.type() ==
'ParticleCombiner' and param.name ==
'decayString':
56 name = param.values.split(
':')[1].split(
' -> ')[0]
57 built_lists.append(name)
60 for a, b
in zip(loaded_modules, expected_modules):
61 self.assertEqual(a, b,
"Loaded module \'%s\' instead of \'%s\' with function %s" % (a, b, std_function.__name__))
64 for a, b
in zip(built_lists, expected_lists):
65 self.assertEqual(a, b,
"Loaded list \'%s\' instead of \'%s\' with function %s" % (a, b, std_function.__name__))
◆ test_belle_list()
def test_belle_list |
( |
|
self | ) |
|
check that the builder function works with the legacy Belle Kshorts list
Definition at line 71 of file test_std_v0.py.
◆ test_stdkshorts_list()
def test_stdkshorts_list |
( |
|
self | ) |
|
check that the builder function works with the stdKshorts list
Definition at line 67 of file test_std_v0.py.
◆ test_stdlambdas_list()
def test_stdlambdas_list |
( |
|
self | ) |
|
check that the builder function works with the stdLambdas list
Definition at line 80 of file test_std_v0.py.
The documentation for this class was generated from the following file: