|
def | _check_list (self, listtype=None, std_function=stdPhotons.stdPhotons, expected_lists=["all"]) |
|
Test case for standard photon lists
Definition at line 19 of file test_std_photons.py.
◆ _check_list()
def _check_list |
( |
|
self, |
|
|
|
listtype = None , |
|
|
|
std_function = stdPhotons.stdPhotons , |
|
|
|
expected_lists = ["all"] |
|
) |
| |
|
private |
check that a given listtype function works
Definition at line 22 of file test_std_photons.py.
22 def _check_list(self, listtype=None, std_function=stdPhotons.stdPhotons, expected_lists=["all"]):
23 """check that a given listtype function works"""
24 testpath = create_path()
25 if (std_function
is stdPhotons.stdPhotons)
and (listtype
is not None):
26 std_function(listtype, path=testpath)
28 std_function(path=testpath)
32 len(testpath.modules()), len(set(expected_lists)) + 1
if listtype ==
'all' else len(set(expected_lists)) + 3,
33 "List %s doesn't work with function %s" % (listtype, std_function.__name__))
34 self.assertTrue(all((module.type() ==
"ParticleLoader")
or (module.type() ==
"ParticleListManipulator")
35 or (module.type() ==
"ParticleSelector")
36 for module
in testpath.modules()))
40 for module
in testpath.modules():
41 for param
in module.available_params():
42 if param.name ==
'decayStrings':
43 name = param.values[0].split(
':')[1]
44 built_list.append(name)
45 if param.name ==
'outputListName':
46 name = str(param.values).split(
':')[1]
47 built_list.append(name)
50 for a, b
in zip(built_list, expected_lists):
51 self.assertEqual(a, b,
"Loaded list \'%s\' instead of \'%s\' with function %s" % (a, b, std_function.__name__))
◆ test_all_list()
def test_all_list |
( |
|
self | ) |
|
check that the builder function works with the all list
Definition at line 78 of file test_std_photons.py.
◆ test_belle()
◆ test_cdc_list()
def test_cdc_list |
( |
|
self | ) |
|
check that the builder function works with the cdc list
Definition at line 82 of file test_std_photons.py.
◆ test_default_list()
def test_default_list |
( |
|
self | ) |
|
check that the builder function works with the default (loose) list
Definition at line 90 of file test_std_photons.py.
◆ test_default_list_exists()
def test_default_list_exists |
( |
|
self | ) |
|
Check that the default list type is one of the lists in the cases that are checked for in :func:`stdPhotons.stdPhotons`.
This test relies on ``ValueError`` being raised for nonsense list types, which is tested by
:func:`test_nonsense_list`. However, :func:`test_nonsense_list` doesn't ensure that the default list works, so
for that this test is needed.
Definition at line 57 of file test_std_photons.py.
◆ test_default_list_works()
def test_default_list_works |
( |
|
self | ) |
|
◆ test_loose_list()
def test_loose_list |
( |
|
self | ) |
|
check that the builder function works with the loose list
Definition at line 86 of file test_std_photons.py.
◆ test_nonsense_list()
def test_nonsense_list |
( |
|
self | ) |
|
Check that the builder function raises a ValueError for a non-existing list name.
Definition at line 53 of file test_std_photons.py.
◆ test_pi0eff10_May2020_list()
def test_pi0eff10_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff10_May2020 list
Definition at line 118 of file test_std_photons.py.
◆ test_pi0eff20_May2020_list()
def test_pi0eff20_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff20_May2020 list
Definition at line 114 of file test_std_photons.py.
◆ test_pi0eff30_May2020_list()
def test_pi0eff30_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff30_May2020 list
Definition at line 110 of file test_std_photons.py.
◆ test_pi0eff40_May2020_list()
def test_pi0eff40_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff40_May2020 list
Definition at line 106 of file test_std_photons.py.
◆ test_pi0eff50_May2020_list()
def test_pi0eff50_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff50_May2020 list
Definition at line 102 of file test_std_photons.py.
◆ test_pi0eff60_May2020_list()
def test_pi0eff60_May2020_list |
( |
|
self | ) |
|
check that the builder function works with the pi0eff60_May2020 list
Definition at line 98 of file test_std_photons.py.
◆ test_skim()
◆ test_tight_list()
def test_tight_list |
( |
|
self | ) |
|
check that the builder function works with the tight list
Definition at line 94 of file test_std_photons.py.
The documentation for this class was generated from the following file: