Belle II Software development
test_variables_collections.py
1#!/usr/bin/env python3
2
3
10
11import unittest
12import variables.collections as vc
13from variables import variables as vm
14
15
16class TestVariableCollections(unittest.TestCase):
17 """Test case for the variables.collections """
18
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
31if __name__ == '__main__':
32 unittest.main()