Belle II Software  release-08-01-10
TestStdV0 Class Reference
Inheritance diagram for TestStdV0:
Collaboration diagram for TestStdV0:

Public Member Functions

def test_stdkshorts_list (self)
 
def test_belle_list (self)
 
def test_stdlambdas_list (self)
 

Private Member Functions

def _check_list (self, std_function=stdV0s.stdKshorts, expected_modules=["ParticleLoader", "ParticleListManipulator", "TreeFitter", "ParticleSelector", "ParticleLoader", "ParticleCombiner", "TreeFitter", "ParticleSelector", "ParticleListManipulator"], expected_lists=['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged'])
 

Detailed Description

Test case for standard V0 lists

Definition at line 16 of file test_std_v0.py.

Member Function Documentation

◆ _check_list()

def _check_list (   self,
  std_function = stdV0s.stdKshorts,
  expected_modules = [                 "ParticleLoader",                 "ParticleListManipulator",                 "TreeFitter",                 "ParticleSelector",                 "ParticleLoader",                 "ParticleCombiner",                 "TreeFitter",                 "ParticleSelector",                 "ParticleListManipulator"],
  expected_lists = ['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged'] 
)
private
check that a given function works

Definition at line 19 of file test_std_v0.py.

32  expected_lists=['V0_ToFit', 'V0_ToFit', 'all', 'RD', 'merged']):
33  """check that a given function works"""
34  testpath = create_path()
35  std_function(path=testpath)
36 
37  loaded_modules = []
38  built_lists = []
39  for module in testpath.modules():
40  loaded_modules.append(module.type())
41  for param in module.available_params():
42  if module.type() == 'ParticleLoader' and param.name == 'decayStrings':
43  name = param.values[0].split(':')[1].split(' -> ')[0]
44  built_lists.append(name)
45  if module.type() == 'ParticleListManipulator' and param.name == 'outputListName':
46  name = str(param.values).split(':')[1].split(' -> ')[0]
47  built_lists.append(name)
48  if module.type() == 'ParticleCombiner' and param.name == 'decayString':
49  name = param.values.split(':')[1].split(' -> ')[0]
50  built_lists.append(name)
51 
52  # Check that we load the correct modules
53  self.assertListEqual(
54  loaded_modules, expected_modules,
55  f"Loaded modules do not match the expected ones (function {std_function.__name__})")
56 
57  # Check that we load the correct particle lists
58  self.assertListEqual(
59  built_lists, expected_lists,
60  f"Built particles lists do not match the expected ones (function {std_function.__name__})")
61 

◆ test_belle_list()

def test_belle_list (   self)
check that the builder function works with the legacy Belle Kshorts list

Definition at line 66 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 62 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 76 of file test_std_v0.py.


The documentation for this class was generated from the following file: