Helper function to easily exclude ROOT6 work-arounds for testing.
>>> os.environ['ROOT6_WORK_AROUND'] = 'all'
>>> ROOT6WorkAroundEnabled()
True
>>> os.environ['ROOT6_WORK_AROUND'] = 'none'
>>> ROOT6WorkAroundEnabled('JIRA-XYZ')
False
>>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X'
>>> ROOT6WorkAroundEnabled('JIRA-X')
True
>>> ROOT6WorkAroundEnabled('JIRA-Y')
True
>>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X,-JIRA-Y'
>>> ROOT6WorkAroundEnabled('JIRA-X')
True
>>> ROOT6WorkAroundEnabled('JIRA-Y')
False
>>> os.environ['ROOT6_WORK_AROUND'] = '-JIRA-Y'
>>> ROOT6WorkAroundEnabled('JIRA-X')
True
>>> ROOT6WorkAroundEnabled('JIRA-Y')
False
Definition at line 4 of file __init__.py.
6 Helper function to easily exclude ROOT6 work-arounds for testing. 8 >>> os.environ['ROOT6_WORK_AROUND'] = 'all' 9 >>> ROOT6WorkAroundEnabled() 11 >>> os.environ['ROOT6_WORK_AROUND'] = 'none' 12 >>> ROOT6WorkAroundEnabled('JIRA-XYZ') 14 >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X' 15 >>> ROOT6WorkAroundEnabled('JIRA-X') 17 >>> ROOT6WorkAroundEnabled('JIRA-Y') 19 >>> os.environ['ROOT6_WORK_AROUND'] = 'JIRA-X,-JIRA-Y' 20 >>> ROOT6WorkAroundEnabled('JIRA-X') 22 >>> ROOT6WorkAroundEnabled('JIRA-Y') 24 >>> os.environ['ROOT6_WORK_AROUND'] = '-JIRA-Y' 25 >>> ROOT6WorkAroundEnabled('JIRA-X') 27 >>> ROOT6WorkAroundEnabled('JIRA-Y') 30 enabled = os.environ.get(
'ROOT6_WORK_AROUND',
'all').lower()
33 if enabled
in (
'none',
'no',
'off',
'false',
'0'):
37 enabled = set(
map(str.strip, enabled.split(
',')))
38 disabled = set([e[1:]
for e
in enabled
if e.startswith(
'-')])
41 return id
in enabled
or id
not in disabled
42 def ROOT6WorkAroundEnabled(id=None)
struct GAUDI_API map
Parametrisation class for map-like implementation.