Belle II Software development
check_globaltag_trim.py
1
8
9'''
10When the database is initialized, the globaltag names are trimmed in order to remove
11leading and trailing whitespaces, which would make basf2 crashing.
12
13This test checks if the trim is correctly applied.
14'''
15
16import basf2 as b2
17
18
19tag = b2.conditions.default_globaltags[0]
20tags = [f' {tag}', f'{tag} ', f' {tag} ']
21b2.conditions.override_globaltags(tags)
22
23main = b2.Path()
24main.add_module('EventInfoSetter')
25main.add_module('PrintBeamParameters') # this module "touches" the database
26b2.process(main) # if the process does not crash, we are happy