Belle II Software
light-2406-ragdoll
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()
test_variables_collections.TestVariableCollections
Definition:
test_variables_collections.py:16
test_variables_collections.TestVariableCollections.test_collections
def test_collections(self)
Definition:
test_variables_collections.py:19
variables.collections
Definition:
collections.py:1
analysis
tests
test_variables_collections.py
Generated on Tue Jul 9 2024 23:27:25 for Belle II Software by
1.9.6