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