Belle II Software  release-08-01-10
test_variables_collections.py
1 #!/usr/bin/env python3
2 
3 
10 
11 import unittest
12 import variables.collections as vc
13 from variables import variables as vm
14 
15 
16 class TestVariableCollections(unittest.TestCase):
17  """Test case for the variables.collections """
18 
19  def test_collections(self):
20  """ Loads all variables from collections into variable manager """
21  excluded = ['utils', 'name', 'value']
22  for collection in dir(vc):
23  if (collection.startswith('__') or collection in excluded):
24  continue
25  var_collection = getattr(vc, collection)
26  for variable_name in var_collection:
27  variable = vm.getVariable(variable_name)
28  self.assertNotEqual(variable, None)
29 
30 
31 if __name__ == '__main__':
32  unittest.main()