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

Public Member Functions

def assertAliases (self, decaystring, expected, **argk)
 
def test_wrong_decaystring (self)
 to add to the tests here, please add a test_something_something for you favourite complicated decay string More...
 
def test_no_particle_selected (self)
 
def test_number_of_prefix_mismatch (self)
 
def test_prefixes_repeated (self)
 
def test_named_daughter (self)
 
def test_named_mother_and_daughters (self)
 
def test_unnamed_daughter (self)
 
def test_unnamed_mother (self)
 
def test_autonamed_granddaughter (self)
 
def test_multiple_autoname_granddaughters (self)
 
def test_autoindex (self)
 
def test_autoindex_relative (self)
 
def test_autoindex_allindexed (self)
 
def test_autoindex_allindexed_relative (self)
 
def test_indexed (self)
 
def test_indexed_relativeignored (self)
 
def test_threedkp (self)
 
def test_fourdkp (self)
 
def test_ohsomany_autonamed (self)
 
def test_ohsomany_autonamed_relative (self)
 
def test_ohsomany_indexed (self)
 
def test_inclusive (self)
 
def test_zfinal (self)
 

Private Member Functions

def _expand_expected (self, expected)
 

Static Private Attributes

list _list_of_variables = ['M', 'p']
 list of variables to test
 

Detailed Description

Test case for the variables.utils functions

Definition at line 16 of file test_variables_utils.py.

Member Function Documentation

◆ _expand_expected()

def _expand_expected (   self,
  expected 
)
private
Expand the list of expected aliases by appending _{name} for each variable in the _list_of_variables

Definition at line 22 of file test_variables_utils.py.

22  def _expand_expected(self, expected):
23  """Expand the list of expected aliases by appending _{name} for each variable in the _list_of_variables"""
24  result = []
25  for p in expected:
26  if p:
27  result += [f"{p}_{e}" for e in self._list_of_variables]
28  else:
29  result += self._list_of_variables
30  return result
31 

◆ assertAliases()

def assertAliases (   self,
  decaystring,
  expected,
**  argk 
)
Make sure the aliases created for given decaystring are as expected
Also, pass any additional keyword arguments to the create_aliases_for_selected function

Definition at line 32 of file test_variables_utils.py.

◆ test_autoindex()

def test_autoindex (   self)
 check decay-string-of-doom with automatic names 

Definition at line 100 of file test_variables_utils.py.

◆ test_autoindex_allindexed()

def test_autoindex_allindexed (   self)
 check decay-string-of-doom with automatic names and forced indices

Definition at line 134 of file test_variables_utils.py.

◆ test_autoindex_allindexed_relative()

def test_autoindex_allindexed_relative (   self)
 check decay-string-of-doom with automatic names, relative indexing and forced indices

Definition at line 151 of file test_variables_utils.py.

◆ test_autoindex_relative()

def test_autoindex_relative (   self)
 check decay-string-of-doom with automatic names and relative indexing

Definition at line 117 of file test_variables_utils.py.

◆ test_autonamed_granddaughter()

def test_autonamed_granddaughter (   self)
Check granddaughter can be selected for an automatic name alias

Definition at line 85 of file test_variables_utils.py.

◆ test_fourdkp()

def test_fourdkp (   self)
 check if the indexing works with more than two ... 

Definition at line 212 of file test_variables_utils.py.

◆ test_inclusive()

def test_inclusive (   self)
Select a decay with the inclusive particle marker

Definition at line 284 of file test_variables_utils.py.

◆ test_indexed()

def test_indexed (   self)
 check decay-string-of-doom w/o automatic names 

Definition at line 168 of file test_variables_utils.py.

◆ test_indexed_relativeignored()

def test_indexed_relativeignored (   self)
 check decay-string-of-doom w/o automatic names and make sure relative indexing is **not** honored

Definition at line 185 of file test_variables_utils.py.

◆ test_multiple_autoname_granddaughters()

def test_multiple_autoname_granddaughters (   self)
Check multiple granddaughters can be selected for automatic name aliases

Definition at line 89 of file test_variables_utils.py.

◆ test_named_daughter()

def test_named_daughter (   self)
Check daughter can be selected for an specific named alias

Definition at line 67 of file test_variables_utils.py.

◆ test_named_mother_and_daughters()

def test_named_mother_and_daughters (   self)
Check mother and daughter can be selected for an specific named alias

Definition at line 71 of file test_variables_utils.py.

◆ test_no_particle_selected()

def test_no_particle_selected (   self)
Make sure we get an error if o particle is selected

Definition at line 49 of file test_variables_utils.py.

◆ test_number_of_prefix_mismatch()

def test_number_of_prefix_mismatch (   self)
Make sure we get an error if the number of supplied prefixes doesn't
match the number of selected particles

Definition at line 54 of file test_variables_utils.py.

◆ test_ohsomany_autonamed()

def test_ohsomany_autonamed (   self)
Test many many children

Definition at line 237 of file test_variables_utils.py.

◆ test_ohsomany_autonamed_relative()

def test_ohsomany_autonamed_relative (   self)
Test many many children with relative indices

Definition at line 251 of file test_variables_utils.py.

◆ test_ohsomany_indexed()

def test_ohsomany_indexed (   self)
Test many many children without names

Definition at line 265 of file test_variables_utils.py.

◆ test_prefixes_repeated()

def test_prefixes_repeated (   self)
Make sure we got an error if the supplied provided prefixes are not unique

Definition at line 62 of file test_variables_utils.py.

◆ test_threedkp()

def test_threedkp (   self)
 check if the indexing works with more than two ... 

Definition at line 202 of file test_variables_utils.py.

◆ test_unnamed_daughter()

def test_unnamed_daughter (   self)
Check daughter can be selected w/o an specific named alias

Definition at line 75 of file test_variables_utils.py.

◆ test_unnamed_mother()

def test_unnamed_mother (   self)
Check daughter can be selected w/o an specific named alias

Definition at line 79 of file test_variables_utils.py.

◆ test_wrong_decaystring()

def test_wrong_decaystring (   self)

to add to the tests here, please add a test_something_something for you favourite complicated decay string

Make sure we get an error if the decaystring is not valid

Definition at line 44 of file test_variables_utils.py.

◆ test_zfinal()

def test_zfinal (   self)
Print all aliases as a final check

Definition at line 288 of file test_variables_utils.py.


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