diff --git a/src/rougail/annotator.py b/src/rougail/annotator.py index c6d8d7fc..94f96e7b 100644 --- a/src/rougail/annotator.py +++ b/src/rougail/annotator.py @@ -38,7 +38,7 @@ modes = mode_factory() # that shall not be present in the exported (flatened) XML ERASED_ATTRIBUTES = ('redefine', 'exists', 'fallback', 'optional', 'remove_check', 'namespace', 'remove_condition', 'path', 'instance_mode', 'index', 'is_in_leadership', - 'level') # , '_real_container') + 'level', 'remove_fill') ERASED_CONTAINER_ATTRIBUTES = ('id', 'container', 'group_id', 'group', 'container_group') FORCE_CHOICE = {'oui/non': ['oui', 'non'], diff --git a/src/rougail/data/rougail.dtd b/src/rougail/data/rougail.dtd index fcf88e51..46f1e10a 100644 --- a/src/rougail/data/rougail.dtd +++ b/src/rougail/data/rougail.dtd @@ -45,7 +45,7 @@ - + @@ -75,14 +75,6 @@ - - - - - - - - @@ -110,6 +102,7 @@ + diff --git a/src/rougail/objspace.py b/src/rougail/objspace.py index cc205a3e..37b82308 100644 --- a/src/rougail/objspace.py +++ b/src/rougail/objspace.py @@ -92,6 +92,7 @@ class CreoleObjSpace: self.xmlreflector = XMLReflector() self.xmlreflector.parse_dtd(dtdfilename) self.redefine_variables = None + self.fill_removed = None self.check_removed = None self.condition_removed = None @@ -153,6 +154,7 @@ class CreoleObjSpace: """ for xmlfile, document in self.xmlreflector.load_xml_from_folders(xmlfolders): self.redefine_variables = [] + self.fill_removed = [] self.check_removed = [] self.condition_removed = [] self.xml_parse_document(document, @@ -383,6 +385,18 @@ class CreoleObjSpace: ) return variable_obj + def remove_fill(self, name): # pylint: disable=C0111 + if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'fill'): + remove_fills= [] + for idx, fill in enumerate(self.space.constraints.fill): # pylint: disable=E1101 + if hasattr(fill, 'target') and fill.target == name: + remove_fills.append(idx) + + remove_fills = list(set(remove_fills)) + remove_fills.sort(reverse=True) + for idx in remove_fills: + self.space.constraints.fill.pop(idx) # pylint: disable=E1101 + def remove_check(self, name): # pylint: disable=C0111 if hasattr(self.space, 'constraints') and hasattr(self.space.constraints, 'check'): remove_checks = [] @@ -468,16 +482,21 @@ class CreoleObjSpace: self.remove_check(variableobj.name) if child.attrib.get('remove_condition', False): self.remove_condition(variableobj.name) + if child.attrib.get('remove_fill', False): + self.remove_fill(variableobj.name) if child.tag == 'fill': # if variable is a redefine in current dictionary # XXX not working with variable not in variable and in leader/followers variableobj.redefine = child.attrib['target'] in self.redefine_variables + if child.attrib['target'] in self.redefine_variables and child.attrib['target'] not in self.fill_removed: + self.remove_fill(child.attrib['target']) + self.fill_removed.append(child.attrib['target']) if not hasattr(variableobj, 'index'): variableobj.index = self.index if child.tag == 'check' and child.attrib['target'] in self.redefine_variables and child.attrib['target'] not in self.check_removed: self.remove_check(child.attrib['target']) self.check_removed.append(child.attrib['target']) - if child.tag == 'condition' and child.attrib['source'] in self.redefine_variables and child.attrib['source'] not in self.check_removed: + if child.tag == 'condition' and child.attrib['source'] in self.redefine_variables and child.attrib['source'] not in self.condition_removed: self.remove_condition(child.attrib['source']) self.condition_removed.append(child.attrib['source']) variableobj.namespace = namespace diff --git a/tests/dictionaries/00empty/tiramisu/base.py b/tests/dictionaries/00empty/tiramisu/base.py index 500aecf5..9c1dfd24 100644 --- a/tests/dictionaries/00empty/tiramisu/base.py +++ b/tests/dictionaries/00empty/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_2 = OptionDescription(name='tata', doc='tata', children=[]) option_2.impl_set_information("manage", True) option_1 = OptionDescription(name='services', doc='services', properties=frozenset({'hidden'}), children=[option_2]) diff --git a/tests/dictionaries/00load_autofreeze/tiramisu/base.py b/tests/dictionaries/00load_autofreeze/tiramisu/base.py index 4d92e9f0..97ebe1a3 100644 --- a/tests/dictionaries/00load_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreeze/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py index 446cb043..d409c87f 100644 --- a/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autofreezeexpert/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'expert', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/00load_autosave/tiramisu/base.py b/tests/dictionaries/00load_autosave/tiramisu/base.py index 6a1fa723..00e39f8f 100644 --- a/tests/dictionaries/00load_autosave/tiramisu/base.py +++ b/tests/dictionaries/00load_autosave/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py index a5e922f7..24553e0b 100644 --- a/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py +++ b/tests/dictionaries/00load_autosaveexpert/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'expert'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/00load_comment/tiramisu/base.py b/tests/dictionaries/00load_comment/tiramisu/base.py index f844f854..47434df5 100644 --- a/tests/dictionaries/00load_comment/tiramisu/base.py +++ b/tests/dictionaries/00load_comment/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/00load_notype/tiramisu/base.py b/tests/dictionaries/00load_notype/tiramisu/base.py index 1a591eac..d4a98ff9 100644 --- a/tests/dictionaries/00load_notype/tiramisu/base.py +++ b/tests/dictionaries/00load_notype/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='without_type', doc='without_type', multi=False, default='non') option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/00load_save/tiramisu/base.py b/tests/dictionaries/00load_save/tiramisu/base.py index f844f854..47434df5 100644 --- a/tests/dictionaries/00load_save/tiramisu/base.py +++ b/tests/dictionaries/00load_save/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/00load_subfolder/tiramisu/base.py b/tests/dictionaries/00load_subfolder/tiramisu/base.py index 9daa0bf4..25529dfa 100644 --- a/tests/dictionaries/00load_subfolder/tiramisu/base.py +++ b/tests/dictionaries/00load_subfolder/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01auto_base/tiramisu/base.py b/tests/dictionaries/01auto_base/tiramisu/base.py index f5e62662..2244cd9e 100644 --- a/tests/dictionaries/01auto_base/tiramisu/base.py +++ b/tests/dictionaries/01auto_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01auto_withoutparam/tiramisu/base.py b/tests/dictionaries/01auto_withoutparam/tiramisu/base.py index f4dabd5c..818bbb99 100644 --- a/tests/dictionaries/01auto_withoutparam/tiramisu/base.py +++ b/tests/dictionaries/01auto_withoutparam/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((), kwargs={})), values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01base_multi/tiramisu/base.py b/tests/dictionaries/01base_multi/tiramisu/base.py index 3142ff75..a66267ed 100644 --- a/tests/dictionaries/01base_multi/tiramisu/base.py +++ b/tests/dictionaries/01base_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine description', multi=True, default=['non'], default_multi='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py index 80f274a7..9344c659 100644 --- a/tests/dictionaries/01fill_autofreeze/tiramisu/base.py +++ b/tests/dictionaries/01fill_autofreeze/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) diff --git a/tests/dictionaries/01fill_autosave/tiramisu/base.py b/tests/dictionaries/01fill_autosave/tiramisu/base.py index 5a2b79f9..744081b4 100644 --- a/tests/dictionaries/01fill_autosave/tiramisu/base.py +++ b/tests/dictionaries/01fill_autosave/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'basic', 'force_store_value', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01fill_base/tiramisu/base.py b/tests/dictionaries/01fill_base/tiramisu/base.py index 50c11863..879048aa 100644 --- a/tests/dictionaries/01fill_base/tiramisu/base.py +++ b/tests/dictionaries/01fill_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01fill_baseaccent/tiramisu/base.py b/tests/dictionaries/01fill_baseaccent/tiramisu/base.py index e40af6b5..500aba18 100644 --- a/tests/dictionaries/01fill_baseaccent/tiramisu/base.py +++ b/tests/dictionaries/01fill_baseaccent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01fill_mandatory/tiramisu/base.py b/tests/dictionaries/01fill_mandatory/tiramisu/base.py index e4b5e843..c10c7b4f 100644 --- a/tests/dictionaries/01fill_mandatory/tiramisu/base.py +++ b/tests/dictionaries/01fill_mandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01fill_number/tiramisu/base.py b/tests/dictionaries/01fill_number/tiramisu/base.py index 93c790c4..74bb0ac6 100644 --- a/tests/dictionaries/01fill_number/tiramisu/base.py +++ b/tests/dictionaries/01fill_number/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = IntOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue(3)), kwargs={}))) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01fill_optional/tiramisu/base.py b/tests/dictionaries/01fill_optional/tiramisu/base.py index f5e62662..2244cd9e 100644 --- a/tests/dictionaries/01fill_optional/tiramisu/base.py +++ b/tests/dictionaries/01fill_optional/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/01separator_base/tiramisu/base.py b/tests/dictionaries/01separator_base/tiramisu/base.py index 5f2f202d..81455b2b 100644 --- a/tests/dictionaries/01separator_base/tiramisu/base.py +++ b/tests/dictionaries/01separator_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3.impl_set_information("separator", "Établissement") option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) diff --git a/tests/dictionaries/01separator_neverhidden/tiramisu/base.py b/tests/dictionaries/01separator_neverhidden/tiramisu/base.py index 5f2f202d..81455b2b 100644 --- a/tests/dictionaries/01separator_neverhidden/tiramisu/base.py +++ b/tests/dictionaries/01separator_neverhidden/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3.impl_set_information("separator", "Établissement") option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) diff --git a/tests/dictionaries/10autosave_hidden/tiramisu/base.py b/tests/dictionaries/10autosave_hidden/tiramisu/base.py index 14b7f458..159efd65 100644 --- a/tests/dictionaries/10autosave_hidden/tiramisu/base.py +++ b/tests/dictionaries/10autosave_hidden/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', 'frozen', 'hidden'}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10autosave_hidden_frozenifin/tiramisu/base.py b/tests/dictionaries/10autosave_hidden_frozenifin/tiramisu/base.py index 9fe297f4..c2ab2847 100644 --- a/tests/dictionaries/10autosave_hidden_frozenifin/tiramisu/base.py +++ b/tests/dictionaries/10autosave_hidden_frozenifin/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'basic', 'force_store_value', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='autosavevar', doc='autosave variable', multi=False, default=Calculation(func.calc_val, Params((ParamValue("oui")), kwargs={}))) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'basic'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10check_base/tiramisu/base.py b/tests/dictionaries/10check_base/tiramisu/base.py index 7f214b7c..5fa9ad8b 100644 --- a/tests/dictionaries/10check_base/tiramisu/base.py +++ b/tests/dictionaries/10check_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b') option_4 = IntOption(properties=frozenset({'normal'}), name='int', doc='No change', multi=False, max_number=100, min_number=0) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10check_no_param/tiramisu/base.py b/tests/dictionaries/10check_no_param/tiramisu/base.py index 06281772..6a38e064 100644 --- a/tests/dictionaries/10check_no_param/tiramisu/base.py +++ b/tests/dictionaries/10check_no_param/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b') option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={}), warnings_only=False)], name='int', doc='No change', multi=False) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10check_option/tiramisu/base.py b/tests/dictionaries/10check_option/tiramisu/base.py index 9b07c753..3d7f6a7e 100644 --- a/tests/dictionaries/10check_option/tiramisu/base.py +++ b/tests/dictionaries/10check_option/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b') option_4 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='int2', doc='No change', multi=False, default=100) option_5 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_lower, Params((ParamSelfOption()), kwargs={'mini': ParamValue("0"), 'maxi': ParamOption(option_4, notraisepropertyerror=False, todict=False)}), warnings_only=False)], name='int', doc='No change', multi=False) diff --git a/tests/dictionaries/10check_optional/tiramisu/base.py b/tests/dictionaries/10check_optional/tiramisu/base.py index e921d87f..d2853955 100644 --- a/tests/dictionaries/10check_optional/tiramisu/base.py +++ b/tests/dictionaries/10check_optional/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b') option_5 = IntOption(properties=frozenset({'normal'}), name='int2', doc='No change', multi=False) option_4 = IntOption(properties=frozenset({'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_5, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='int', doc='No change', multi=False) diff --git a/tests/dictionaries/10check_valid_differ/tiramisu/base.py b/tests/dictionaries/10check_valid_differ/tiramisu/base.py index 71e1ef29..16d03858 100644 --- a/tests/dictionaries/10check_valid_differ/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), validators=[Calculation(func.valid_not_equal, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=False)], name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py b/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py index a4da3a01..1a23405b 100644 --- a/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ_add/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py b/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py index a4da3a01..1a23405b 100644 --- a/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_differ_removecheck/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py b/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py index 0b90eb8d..ca78b4b4 100644 --- a/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py +++ b/tests/dictionaries/10check_valid_ipnetmask/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = IPOption(private_only=True, warnings_only=True, properties=frozenset({'basic', 'mandatory'}), name='adresse_ip_eth0', doc='Adresse IP de la carte', multi=False) option_5 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), validators=[Calculation(func.valid_ip_netmask, Params((ParamSelfOption(), ParamOption(option_4, notraisepropertyerror=False, todict=False)), kwargs={}), warnings_only=True)], name='adresse_netmask_eth0', doc='Masque de sous réseau de la carte', multi=False) diff --git a/tests/dictionaries/10leadership_append/tiramisu/base.py b/tests/dictionaries/10leadership_append/tiramisu/base.py index 893bab2c..77d7c860 100644 --- a/tests/dictionaries/10leadership_append/tiramisu/base.py +++ b/tests/dictionaries/10leadership_append/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10leadership_auto/tiramisu/base.py b/tests/dictionaries/10leadership_auto/tiramisu/base.py index 75b38672..25e40a7a 100644 --- a/tests/dictionaries/10leadership_auto/tiramisu/base.py +++ b/tests/dictionaries/10leadership_auto/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_autoleader/tiramisu/base.py b/tests/dictionaries/10leadership_autoleader/tiramisu/base.py index 0b464d01..9383b4e1 100644 --- a/tests/dictionaries/10leadership_autoleader/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autoleader/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py b/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py index aa439e76..85e6d953 100644 --- a/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autoleader_expert/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py b/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py index 70459fca..e6bd370f 100644 --- a/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py +++ b/tests/dictionaries/10leadership_autosaveexpert/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py b/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py index fda23f20..42bb96cf 100644 --- a/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py +++ b/tests/dictionaries/10leadership_familyaccent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py b/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py index 337fa43b..66a90baf 100644 --- a/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leader_hidden/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_6 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen'}), name='leader', doc='leader', multi=True, default=Calculation(func.calc_list, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py b/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py index db1659cc..5eae8d0f 100644 --- a/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leader_hidden_if_in/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_6 = StrOption(properties=frozenset({Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('non')}))}), name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py b/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py index 5cc96ebd..37314913 100644 --- a/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py +++ b/tests/dictionaries/10leadership_leadermandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_mandatory/tiramisu/base.py b/tests/dictionaries/10leadership_mandatory/tiramisu/base.py index 00f0730b..dc5dcb6f 100644 --- a/tests/dictionaries/10leadership_mandatory/tiramisu/base.py +++ b/tests/dictionaries/10leadership_mandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default=Calculation(func.calc_val, Params((), kwargs={'valeur': ParamValue("valfill")}))) diff --git a/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py b/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py index f1d54453..2b3032e5 100644 --- a/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py +++ b/tests/dictionaries/10leadership_mandatoryfollower/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_5 = NetmaskOption(name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', multi=True) option_6 = NetworkOption(properties=frozenset({'mandatory', 'normal'}), name='nut_monitor_host', doc='Adresse IP du réseau de l\'esclave', multi=True) diff --git a/tests/dictionaries/10leadership_multi/tiramisu/base.py b/tests/dictionaries/10leadership_multi/tiramisu/base.py index f62c8182..5e9f2a2d 100644 --- a/tests/dictionaries/10leadership_multi/tiramisu/base.py +++ b/tests/dictionaries/10leadership_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py index e7daeb0c..045c4aa8 100644 --- a/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py index c5a6d70c..e164e131 100644 --- a/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_in_none/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non') option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('None')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py index e546c4e3..a274173f 100644 --- a/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_inaccent_family/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py index 49562737..bd97b904 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py b/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py index 49562737..bd97b904 100644 --- a/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py +++ b/tests/dictionaries/10load_disabled_if_not_in_fallback_force/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py index d02fe4ed..11dea415 100644 --- a/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_fallback/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py index 199de4ae..ece5cb0a 100644 --- a/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_fallback_force/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py b/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py index 199de4ae..ece5cb0a 100644 --- a/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py +++ b/tests/dictionaries/10load_disabledifin_whithouttype/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_emptyvalue/tiramisu/base.py b/tests/dictionaries/10load_emptyvalue/tiramisu/base.py index b817fcbc..99d60ca8 100644 --- a/tests/dictionaries/10load_emptyvalue/tiramisu/base.py +++ b/tests/dictionaries/10load_emptyvalue/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'normal'}), name='mode_conteneur_actif', doc='No change', multi=False) option_4 = StrOption(properties=frozenset({'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10load_frozenifin/tiramisu/base.py b/tests/dictionaries/10load_frozenifin/tiramisu/base.py index 4df1f359..6f508f07 100644 --- a/tests/dictionaries/10load_frozenifin/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py index bdd4bd8c..41a7f17d 100644 --- a/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_auto/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.calc_val, Params((ParamValue("non")), kwargs={})), values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py index ee740c1b..be5cc846 100644 --- a/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_multiparam/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='tous', values=('tous', 'authentifié', 'aucun')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('tous')})), Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('authentifié')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py b/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py index 6480984e..0c8f50d3 100644 --- a/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py +++ b/tests/dictionaries/10load_frozenifin_noexist/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='tous', values=('tous', 'authentifié', 'aucun')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py b/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py index 4ba2c60c..cb1e16d1 100644 --- a/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py +++ b/tests/dictionaries/10load_hidden_if_family/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('hidden'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')})), Calculation(calc_value, Params(ParamValue('force_default_on_freeze'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/10load_leadership/tiramisu/base.py b/tests/dictionaries/10load_leadership/tiramisu/base.py index 860bd6b0..40c6be70 100644 --- a/tests/dictionaries/10load_leadership/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py b/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py index 5e61121e..733972c1 100644 --- a/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_default_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='leader', multi=True, default=['non'], default_multi='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default_multi='value') diff --git a/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py b/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py index 46b6c316..8eb1e448 100644 --- a/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_default_submulti/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='leader', multi=True, default=['non'], default_multi='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True, default=['leader']) option_6 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=submulti, default_multi=['value']) diff --git a/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py b/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py index 118ccabd..ffb25093 100644 --- a/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_defaultmulti_leader/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='leader', multi=True, default=['non'], default_multi='non', values=('oui', 'non')) option_5 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True, default=['value']) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True) diff --git a/tests/dictionaries/10load_leadership_description/tiramisu/base.py b/tests/dictionaries/10load_leadership_description/tiramisu/base.py index f8542f50..b46cb5be 100644 --- a/tests/dictionaries/10load_leadership_description/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_description/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py b/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py index 5de69a55..6202f6f3 100644 --- a/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_normalize_family/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(properties=frozenset({'mandatory'}), name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py b/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py index a09529cf..b5b069b4 100644 --- a/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py +++ b/tests/dictionaries/10load_leadership_submulti/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py b/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py index 171b5779..aaf23b1a 100644 --- a/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py +++ b/tests/dictionaries/10load_mandatoryifin/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('mandatory'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non') option_5 = StrOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('mandatory'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non') diff --git a/tests/dictionaries/10load_multivalue/tiramisu/base.py b/tests/dictionaries/10load_multivalue/tiramisu/base.py index 64f2ab6f..1bf9e43e 100644 --- a/tests/dictionaries/10load_multivalue/tiramisu/base.py +++ b/tests/dictionaries/10load_multivalue/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=True, default=['non', 'oui'], default_multi='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/10valid_enum_accent/tiramisu/base.py b/tests/dictionaries/10valid_enum_accent/tiramisu/base.py index 3d20cc4d..8661e0e2 100644 --- a/tests/dictionaries/10valid_enum_accent/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_accent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='multi', multi=False, default='c', values=('a', 'b', 'c', 'é')) diff --git a/tests/dictionaries/10valid_enum_base/tiramisu/base.py b/tests/dictionaries/10valid_enum_base/tiramisu/base.py index 7a7b32c1..86bd114b 100644 --- a/tests/dictionaries/10valid_enum_base/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='multi', multi=False, default='c', values=('a', 'b', 'c')) diff --git a/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py b/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py index 43da0cea..dbfd219e 100644 --- a/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_base_redefine/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar2', doc='multi', multi=False, default='c', values=('a', 'b', 'c')) diff --git a/tests/dictionaries/10valid_enum_eosfunc/tiramisu/base.py b/tests/dictionaries/10valid_enum_eosfunc/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/10valid_enum_eosfunc/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_eosfunc/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/10valid_enum_leader/tiramisu/base.py b/tests/dictionaries/10valid_enum_leader/tiramisu/base.py index 0fccef13..644c6fbc 100644 --- a/tests/dictionaries/10valid_enum_leader/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_leader/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='follower1', doc='follower1', multi=True, default_multi='a', values=('a', 'b', 'c')) diff --git a/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py b/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py index 4e58e1ea..3694c214 100644 --- a/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_mandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='multi', multi=False, default='a', values=('a', 'b', 'c')) diff --git a/tests/dictionaries/10valid_enum_multi/tiramisu/base.py b/tests/dictionaries/10valid_enum_multi/tiramisu/base.py index 1827a4f8..49f57dd8 100644 --- a/tests/dictionaries/10valid_enum_multi/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='multi', doc='multi', multi=True, default=['a'], default_multi='a', values=('a', 'b', 'c')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/10valid_enum_none/tiramisu/base.py b/tests/dictionaries/10valid_enum_none/tiramisu/base.py index cebbf612..b625b414 100644 --- a/tests/dictionaries/10valid_enum_none/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_none/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='multi', multi=False, default='b', values=('a', 'b', None)) diff --git a/tests/dictionaries/10valid_enum_number/tiramisu/base.py b/tests/dictionaries/10valid_enum_number/tiramisu/base.py index be2400c6..18f94276 100644 --- a/tests/dictionaries/10valid_enum_number/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_number/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='enumvar', multi=False, default=1, values=(1, 2, 3)) diff --git a/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py b/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py index 413790a2..df4da567 100644 --- a/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_numberdefault/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'expert'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'expert', 'mandatory'}), name='enumvar', doc='enumvar', multi=False, default=3, values=(1, 2, 3)) diff --git a/tests/dictionaries/10valid_enum_python/tiramisu/base.py b/tests/dictionaries/10valid_enum_python/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/10valid_enum_python/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_python/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/10valid_enum_value/tiramisu/base.py b/tests/dictionaries/10valid_enum_value/tiramisu/base.py index e4c891e0..9c4f9248 100644 --- a/tests/dictionaries/10valid_enum_value/tiramisu/base.py +++ b/tests/dictionaries/10valid_enum_value/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='b', values=('a', 'b', 'c')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py index 54331695..52775683 100644 --- a/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = BoolOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default=True) diff --git a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py index 99c29cd7..272d5d66 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_disabled/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py index 0c5bc268..ab07f4da 100644 --- a/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabled_if_in_filelist_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_3, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py index 29af91a5..64792051 100644 --- a/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifin_filelist_notexist/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py index 29af91a5..64792051 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py index 29af91a5..64792051 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py +++ b/tests/dictionaries/11disabledifnotin_filelist_notexist_validenum/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py index 5eaf2816..32ff2abd 100644 --- a/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py +++ b/tests/dictionaries/11multi_disabled_if_in_filelist/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/20family_append/tiramisu/base.py b/tests/dictionaries/20family_append/tiramisu/base.py index 5265212c..5cbf2a29 100644 --- a/tests/dictionaries/20family_append/tiramisu/base.py +++ b/tests/dictionaries/20family_append/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/20family_appendaccent/tiramisu/base.py b/tests/dictionaries/20family_appendaccent/tiramisu/base.py index f0d24a78..4fa47c1c 100644 --- a/tests/dictionaries/20family_appendaccent/tiramisu/base.py +++ b/tests/dictionaries/20family_appendaccent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_7 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif3', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_7, todict=True), 'expected': ParamValue('non')}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/20family_dynamic/tiramisu/base.py b/tests/dictionaries/20family_dynamic/tiramisu/base.py index 5e330242..645fa11c 100644 --- a/tests/dictionaries/20family_dynamic/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='varname', doc='No change', multi=True, default=['val1', 'val2'], default_multi='val2') option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_5 = StrOption(properties=frozenset({'normal'}), name='vardyn', doc='No change', multi=False) diff --git a/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py b/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_calc/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/20family_dynamic_number/tiramisu/base.py b/tests/dictionaries/20family_dynamic_number/tiramisu/base.py index 710a1b52..720caec3 100644 --- a/tests/dictionaries/20family_dynamic_number/tiramisu/base.py +++ b/tests/dictionaries/20family_dynamic_number/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = IntOption(properties=frozenset({'mandatory', 'normal'}), name='varname', doc='No change', multi=True, default=[1, 2], default_multi=2) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='vardyn', doc='No change', multi=False, default='val') diff --git a/tests/dictionaries/20family_empty/tiramisu/base.py b/tests/dictionaries/20family_empty/tiramisu/base.py index 87d36ec4..f630040e 100644 --- a/tests/dictionaries/20family_empty/tiramisu/base.py +++ b/tests/dictionaries/20family_empty/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'basic', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/20family_hidden/tiramisu/base.py b/tests/dictionaries/20family_hidden/tiramisu/base.py index 511914f5..28d0cf25 100644 --- a/tests/dictionaries/20family_hidden/tiramisu/base.py +++ b/tests/dictionaries/20family_hidden/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'hidden', 'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/20family_mode/tiramisu/base.py b/tests/dictionaries/20family_mode/tiramisu/base.py index 87d36ec4..f630040e 100644 --- a/tests/dictionaries/20family_mode/tiramisu/base.py +++ b/tests/dictionaries/20family_mode/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'basic', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/20family_modeleadership/tiramisu/base.py b/tests/dictionaries/20family_modeleadership/tiramisu/base.py index c93cccdc..5ee6c9fc 100644 --- a/tests/dictionaries/20family_modeleadership/tiramisu/base.py +++ b/tests/dictionaries/20family_modeleadership/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = StrOption(name='leader', doc='leader', multi=True) option_6 = StrOption(properties=frozenset({'normal'}), name='follower1', doc='follower1', multi=True) diff --git a/tests/dictionaries/20notemplating/tiramisu/base.py b/tests/dictionaries/20notemplating/tiramisu/base.py index 1c78ea07..5acfdd35 100644 --- a/tests/dictionaries/20notemplating/tiramisu/base.py +++ b/tests/dictionaries/20notemplating/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/20override/tiramisu/base.py b/tests/dictionaries/20override/tiramisu/base.py index dea870ab..bc89bc7f 100644 --- a/tests/dictionaries/20override/tiramisu/base.py +++ b/tests/dictionaries/20override/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/21family_change/tiramisu/base.py b/tests/dictionaries/21family_change/tiramisu/base.py index f8cfc872..15f9ae1c 100644 --- a/tests/dictionaries/21family_change/tiramisu/base.py +++ b/tests/dictionaries/21family_change/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/21family_changeaccent/tiramisu/base.py b/tests/dictionaries/21family_changeaccent/tiramisu/base.py index cd8fc809..da65accc 100644 --- a/tests/dictionaries/21family_changeaccent/tiramisu/base.py +++ b/tests/dictionaries/21family_changeaccent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='Général', properties=frozenset({'normal'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/21family_empty/tiramisu/base.py b/tests/dictionaries/21family_empty/tiramisu/base.py index 637aec54..f8ee0799 100644 --- a/tests/dictionaries/21family_empty/tiramisu/base.py +++ b/tests/dictionaries/21family_empty/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py b/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py index e0a63eeb..ccd638ed 100644 --- a/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withoutvalue/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'basic', 'mandatory'}), name='mode_conteneur_actif', doc='No change', multi=False) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'basic'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py b/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withoutvaluecalc/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py b/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py index 28cfbf16..332169bc 100644 --- a/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withvalue/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='value') option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py b/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py +++ b/tests/dictionaries/30mandatory_withvaluecalc/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/40condition_base/tiramisu/base.py b/tests/dictionaries/40condition_base/tiramisu/base.py index 2c557ea2..a625bf05 100644 --- a/tests/dictionaries/40condition_base/tiramisu/base.py +++ b/tests/dictionaries/40condition_base/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/40condition_fallback/tiramisu/base.py b/tests/dictionaries/40condition_fallback/tiramisu/base.py index 75ef8f53..97dc84ea 100644 --- a/tests/dictionaries/40condition_fallback/tiramisu/base.py +++ b/tests/dictionaries/40condition_fallback/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'disabled', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/40condition_optional/tiramisu/base.py b/tests/dictionaries/40condition_optional/tiramisu/base.py index 34bba746..a3e9bbd6 100644 --- a/tests/dictionaries/40condition_optional/tiramisu/base.py +++ b/tests/dictionaries/40condition_optional/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal', Calculation(calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_4, todict=True), 'expected': ParamValue('oui')}))}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/40empty_param/tiramisu/base.py b/tests/dictionaries/40empty_param/tiramisu/base.py index ed9678cd..551c89af 100644 --- a/tests/dictionaries/40empty_param/tiramisu/base.py +++ b/tests/dictionaries/40empty_param/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = PortOption(allow_private=True, properties=frozenset({'expert'}), name='toto1', doc='Port d\'écoute du proxy', multi=False, default=Calculation(func.calc_multi_condition, Params((ParamValue("None")), kwargs={}))) option_4 = PortOption(allow_private=True, properties=frozenset({'expert', 'mandatory'}), name='toto2', doc='Port d\'écoute du proxy NTLM', multi=False, default='3127') option_2 = OptionDescription(name='proxy_authentifie', doc='proxy authentifié', properties=frozenset({'expert'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/40empty_param2/tiramisu/base.py b/tests/dictionaries/40empty_param2/tiramisu/base.py index 7c34985e..a5ee9ef3 100644 --- a/tests/dictionaries/40empty_param2/tiramisu/base.py +++ b/tests/dictionaries/40empty_param2/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = PortOption(allow_private=True, properties=frozenset({'expert'}), name='toto1', doc='Port d\'écoute du proxy', multi=False, default=Calculation(func.calc_multi_condition, Params((), kwargs={'value': ParamValue("None")}))) option_4 = PortOption(allow_private=True, properties=frozenset({'expert', 'mandatory'}), name='toto2', doc='Port d\'écoute du proxy NTLM', multi=False, default='3127') option_2 = OptionDescription(name='proxy_authentifie', doc='proxy authentifié', properties=frozenset({'expert'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py b/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py index 5ed4ca22..03c70bbe 100644 --- a/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py +++ b/tests/dictionaries/40hidden_if_in_group_fallback/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'mandatory'}), name='mode_conteneur_actif1', doc='No change', multi=True, default=['non'], values=('oui', 'non')) option_6 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=True, default_multi='non', values=('oui', 'non')) diff --git a/tests/dictionaries/40ifin_leadership/tiramisu/base.py b/tests/dictionaries/40ifin_leadership/tiramisu/base.py index 067f9fef..b0f6181e 100644 --- a/tests/dictionaries/40ifin_leadership/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadership/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='condition', multi=False, default='oui', values=('oui', 'non')) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py index b8e0075e..8fbfc4aa 100644 --- a/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py +++ b/tests/dictionaries/40ifin_leadershipauto/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='condition', multi=False, default='oui', values=('oui', 'non')) option_6 = StrOption(name='leader', doc='leader', multi=True) diff --git a/tests/dictionaries/40ifin_multi/tiramisu/base.py b/tests/dictionaries/40ifin_multi/tiramisu/base.py index 8afb6dd5..5698bf29 100644 --- a/tests/dictionaries/40ifin_multi/tiramisu/base.py +++ b/tests/dictionaries/40ifin_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/40ifin_validenum/tiramisu/base.py b/tests/dictionaries/40ifin_validenum/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/40ifin_validenum/tiramisu/base.py +++ b/tests/dictionaries/40ifin_validenum/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/50exists_exists/tiramisu/base.py b/tests/dictionaries/50exists_exists/tiramisu/base.py index 28d6035d..53cf044e 100644 --- a/tests/dictionaries/50exists_exists/tiramisu/base.py +++ b/tests/dictionaries/50exists_exists/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/50redefine_description/tiramisu/base.py b/tests/dictionaries/50redefine_description/tiramisu/base.py index 2181f454..be7a8196 100644 --- a/tests/dictionaries/50redefine_description/tiramisu/base.py +++ b/tests/dictionaries/50redefine_description/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefined', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51exists_nonexists/tiramisu/base.py b/tests/dictionaries/51exists_nonexists/tiramisu/base.py index 9d06935b..7562d282 100644 --- a/tests/dictionaries/51exists_nonexists/tiramisu/base.py +++ b/tests/dictionaries/51exists_nonexists/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Description', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='Description', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='New description', multi=False, default='oui', values=('oui', 'non')) diff --git a/tests/dictionaries/51redefine_auto/tiramisu/base.py b/tests/dictionaries/51redefine_auto/tiramisu/base.py index 7d6ad8fe..d799758c 100644 --- a/tests/dictionaries/51redefine_auto/tiramisu/base.py +++ b/tests/dictionaries/51redefine_auto/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.concat, Params((), kwargs={'valeur': ParamValue("non")})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_autofill/tiramisu/base.py b/tests/dictionaries/51redefine_autofill/tiramisu/base.py index 633df0c6..374d3f5a 100644 --- a/tests/dictionaries/51redefine_autofill/tiramisu/base.py +++ b/tests/dictionaries/51redefine_autofill/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.concat, Params((), kwargs={'valeur': ParamValue("non")})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_family/tiramisu/base.py b/tests/dictionaries/51redefine_family/tiramisu/base.py index a32b8aaf..fb36bd02 100644 --- a/tests/dictionaries/51redefine_family/tiramisu/base.py +++ b/tests/dictionaries/51redefine_family/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif2', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/51redefine_fill/tiramisu/base.py b/tests/dictionaries/51redefine_fill/tiramisu/base.py index 7d6ad8fe..d799758c 100644 --- a/tests/dictionaries/51redefine_fill/tiramisu/base.py +++ b/tests/dictionaries/51redefine_fill/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.concat, Params((), kwargs={'valeur': ParamValue("non")})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_fillauto/tiramisu/base.py b/tests/dictionaries/51redefine_fillauto/tiramisu/base.py index 7d6ad8fe..d799758c 100644 --- a/tests/dictionaries/51redefine_fillauto/tiramisu/base.py +++ b/tests/dictionaries/51redefine_fillauto/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default=Calculation(func.concat, Params((), kwargs={'valeur': ParamValue("non")})), values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_help/tiramisu/base.py b/tests/dictionaries/51redefine_help/tiramisu/base.py index 0d37ca12..61d03acf 100644 --- a/tests/dictionaries/51redefine_help/tiramisu/base.py +++ b/tests/dictionaries/51redefine_help/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='redefine help', multi=False, default='non', values=('oui', 'non')) option_3.impl_set_information("help", "redefine help ok") option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) diff --git a/tests/dictionaries/51redefine_hidden/tiramisu/base.py b/tests/dictionaries/51redefine_hidden/tiramisu/base.py index e821fad7..aabe91f7 100644 --- a/tests/dictionaries/51redefine_hidden/tiramisu/base.py +++ b/tests/dictionaries/51redefine_hidden/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine hidden', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_remove_check/tiramisu/base.py b/tests/dictionaries/51redefine_remove_check/tiramisu/base.py index 2dd59246..ce7ab6f0 100644 --- a/tests/dictionaries/51redefine_remove_check/tiramisu/base.py +++ b/tests/dictionaries/51redefine_remove_check/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = StrOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non') option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py b/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py index 01573329..94a4442d 100644 --- a/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py +++ b/tests/dictionaries/51redefine_remove_condition/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/51redefine_removecondition_alltarget/tiramisu/base.py b/tests/dictionaries/51redefine_removecondition_alltarget/tiramisu/base.py index 83c1759d..fd6facb1 100644 --- a/tests/dictionaries/51redefine_removecondition_alltarget/tiramisu/base.py +++ b/tests/dictionaries/51redefine_removecondition_alltarget/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py b/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py index 10e02322..24f08342 100644 --- a/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py +++ b/tests/dictionaries/51redefine_removecondition_nonautofreeze/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_7 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_7, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='condition', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/51redefine_validenum/tiramisu/base.py b/tests/dictionaries/51redefine_validenum/tiramisu/base.py index bc32a4b3..adf637ed 100644 --- a/tests/dictionaries/51redefine_validenum/tiramisu/base.py +++ b/tests/dictionaries/51redefine_validenum/tiramisu/base.py @@ -1,8 +1,11 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[]) diff --git a/tests/dictionaries/51redefine_value/tiramisu/base.py b/tests/dictionaries/51redefine_value/tiramisu/base.py index a0770820..919c8917 100644 --- a/tests/dictionaries/51redefine_value/tiramisu/base.py +++ b/tests/dictionaries/51redefine_value/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='Redefine value', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='Redefine value', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/51remove_fill/00-base.xml b/tests/dictionaries/51remove_fill/00-base.xml new file mode 100644 index 00000000..5bc01db8 --- /dev/null +++ b/tests/dictionaries/51remove_fill/00-base.xml @@ -0,0 +1,26 @@ + + + + + + + + + + non + + + + + + + + mode_conteneur_actif1 + + + + + + + diff --git a/tests/dictionaries/51remove_fill/01-base.xml b/tests/dictionaries/51remove_fill/01-base.xml new file mode 100644 index 00000000..a2413e16 --- /dev/null +++ b/tests/dictionaries/51remove_fill/01-base.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/tests/dictionaries/51remove_fill/__init__.py b/tests/dictionaries/51remove_fill/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/51remove_fill/makedict/base.json b/tests/dictionaries/51remove_fill/makedict/base.json new file mode 100644 index 00000000..bf7550e6 --- /dev/null +++ b/tests/dictionaries/51remove_fill/makedict/base.json @@ -0,0 +1 @@ +{"rougail.general.mode_conteneur_actif": "oui", "rougail.general.mode_conteneur_actif1": "non"} diff --git a/tests/dictionaries/51remove_fill/tiramisu/__init__.py b/tests/dictionaries/51remove_fill/tiramisu/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/dictionaries/51remove_fill/tiramisu/base.py b/tests/dictionaries/51remove_fill/tiramisu/base.py new file mode 100644 index 00000000..0fbc07a3 --- /dev/null +++ b/tests/dictionaries/51remove_fill/tiramisu/base.py @@ -0,0 +1,15 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) +try: + from tiramisu3 import * +except: + from tiramisu import * +from rougail.tiramisu import ConvertDynOptionDescription +option_3 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) +option_4 = ChoiceOption(properties=frozenset({'mandatory', 'normal'}), name='mode_conteneur_actif1', doc='No change', multi=False, default='non', values=('oui', 'non')) +option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3, option_4]) +option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) +option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1]) diff --git a/tests/dictionaries/52exists_redefine/tiramisu/base.py b/tests/dictionaries/52exists_redefine/tiramisu/base.py index d2979842..457f5830 100644 --- a/tests/dictionaries/52exists_redefine/tiramisu/base.py +++ b/tests/dictionaries/52exists_redefine/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='New description', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='general', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/60action_external/tiramisu/base.py b/tests/dictionaries/60action_external/tiramisu/base.py index 9e776c41..079e5107 100644 --- a/tests/dictionaries/60action_external/tiramisu/base.py +++ b/tests/dictionaries/60action_external/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py index e47255da..2b470570 100644 --- a/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py +++ b/tests/dictionaries/60extra_externalspacecondition/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_5 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='module_instancie', doc='No change', multi=False, default='non', values=('oui', 'non')) option_3 = ChoiceOption(properties=frozenset({'auto_freeze', 'basic', 'force_store_value', 'mandatory', Calculation(calc_value, Params(ParamValue('auto_frozen'), kwargs={'condition': ParamOption(option_5, todict=True), 'expected': ParamValue('oui'), 'reverse_condition': ParamValue(True)}))}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) diff --git a/tests/dictionaries/60extra_group/tiramisu/base.py b/tests/dictionaries/60extra_group/tiramisu/base.py index ac6e938c..14e5487c 100644 --- a/tests/dictionaries/60extra_group/tiramisu/base.py +++ b/tests/dictionaries/60extra_group/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60extra_help/tiramisu/base.py b/tests/dictionaries/60extra_help/tiramisu/base.py index 3a52bb30..3d5d5943 100644 --- a/tests/dictionaries/60extra_help/tiramisu/base.py +++ b/tests/dictionaries/60extra_help/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60extra_load/tiramisu/base.py b/tests/dictionaries/60extra_load/tiramisu/base.py index 614ae51d..9d3914dc 100644 --- a/tests/dictionaries/60extra_load/tiramisu/base.py +++ b/tests/dictionaries/60extra_load/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60extra_mandatory/tiramisu/base.py b/tests/dictionaries/60extra_mandatory/tiramisu/base.py index 6fa684cc..212acda1 100644 --- a/tests/dictionaries/60extra_mandatory/tiramisu/base.py +++ b/tests/dictionaries/60extra_mandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60extra_redefine/tiramisu/base.py b/tests/dictionaries/60extra_redefine/tiramisu/base.py index cb9a21a5..e97378a3 100644 --- a/tests/dictionaries/60extra_redefine/tiramisu/base.py +++ b/tests/dictionaries/60extra_redefine/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60extra_separators/tiramisu/base.py b/tests/dictionaries/60extra_separators/tiramisu/base.py index ca8fe373..c3510700 100644 --- a/tests/dictionaries/60extra_separators/tiramisu/base.py +++ b/tests/dictionaries/60extra_separators/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_4 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='activer_ejabberd', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/60familyaction/tiramisu/base.py b/tests/dictionaries/60familyaction/tiramisu/base.py index bc31e3a2..450057f0 100644 --- a/tests/dictionaries/60familyaction/tiramisu/base.py +++ b/tests/dictionaries/60familyaction/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/60familyaction_accent/tiramisu/base.py b/tests/dictionaries/60familyaction_accent/tiramisu/base.py index bc31e3a2..450057f0 100644 --- a/tests/dictionaries/60familyaction_accent/tiramisu/base.py +++ b/tests/dictionaries/60familyaction_accent/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py b/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py index eba4dcf7..b5b6f450 100644 --- a/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py +++ b/tests/dictionaries/60familyaction_mandatory/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_files/tiramisu/base.py b/tests/dictionaries/70container_files/tiramisu/base.py index 5885ac5e..5c544d27 100644 --- a/tests/dictionaries/70container_files/tiramisu/base.py +++ b/tests/dictionaries/70container_files/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py index 645333a6..ea8bac4f 100644 --- a/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='file_name', doc='file_name', multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi='/etc/mailname2') option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py index 3568afc4..2979fb35 100644 --- a/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py +++ b/tests/dictionaries/70container_files_symlink_multi_variable/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='file_name', doc='file_name', multi=True, default=['/etc/mailname', '/etc/mailname2'], default_multi='/etc/mailname2') option_5 = StrOption(properties=frozenset({'mandatory', 'normal'}), name='var', doc='var', multi=True, default=['mailname', 'mailname2'], default_multi='mailname2') diff --git a/tests/dictionaries/70container_files_twice/tiramisu/base.py b/tests/dictionaries/70container_files_twice/tiramisu/base.py index 0a2abddb..cecefa40 100644 --- a/tests/dictionaries/70container_files_twice/tiramisu/base.py +++ b/tests/dictionaries/70container_files_twice/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_filesmulti/tiramisu/base.py b/tests/dictionaries/70container_filesmulti/tiramisu/base.py index ab9a703c..81015c29 100644 --- a/tests/dictionaries/70container_filesmulti/tiramisu/base.py +++ b/tests/dictionaries/70container_filesmulti/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_filesredefine/tiramisu/base.py b/tests/dictionaries/70container_filesredefine/tiramisu/base.py index 140c83d3..9f873680 100644 --- a/tests/dictionaries/70container_filesredefine/tiramisu/base.py +++ b/tests/dictionaries/70container_filesredefine/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_new/tiramisu/base.py b/tests/dictionaries/70container_new/tiramisu/base.py index 2ab86b31..d0d844bc 100644 --- a/tests/dictionaries/70container_new/tiramisu/base.py +++ b/tests/dictionaries/70container_new/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_newnocont/tiramisu/base.py b/tests/dictionaries/70container_newnocont/tiramisu/base.py index 976dbe69..f1d6ce8a 100644 --- a/tests/dictionaries/70container_newnocont/tiramisu/base.py +++ b/tests/dictionaries/70container_newnocont/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='non', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_newwithip/tiramisu/base.py b/tests/dictionaries/70container_newwithip/tiramisu/base.py index 225e702a..57fa3d22 100644 --- a/tests/dictionaries/70container_newwithip/tiramisu/base.py +++ b/tests/dictionaries/70container_newwithip/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = IPOption(allow_reserved=True, properties=frozenset({'normal'}), name='adresse_ip_test', doc='No change', multi=False) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3, option_4]) diff --git a/tests/dictionaries/70container_pathaccess/tiramisu/base.py b/tests/dictionaries/70container_pathaccess/tiramisu/base.py index 6bce2145..d69fb5d8 100644 --- a/tests/dictionaries/70container_pathaccess/tiramisu/base.py +++ b/tests/dictionaries/70container_pathaccess/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_4 = NetmaskOption(properties=frozenset({'basic', 'mandatory'}), name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', multi=False) option_5 = NetworkOption(properties=frozenset({'basic', 'mandatory'}), name='nut_monitor_host', doc='Adresse IP du réseau de l\'esclave', multi=False) diff --git a/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py b/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py index 05bdc205..e9e26368 100644 --- a/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py +++ b/tests/dictionaries/70container_pathaccess_leadership/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_5 = NetmaskOption(properties=frozenset({'mandatory'}), name='nut_monitor_netmask', doc='Masque de l\'IP du réseau de l\'esclave', multi=True) option_6 = NetworkOption(properties=frozenset({'basic', 'mandatory'}), name='nut_monitor_host', doc='Adresse IP du réseau de l\'esclave', multi=True) diff --git a/tests/dictionaries/70container_save/tiramisu/base.py b/tests/dictionaries/70container_save/tiramisu/base.py index 35b321c8..55f3655f 100644 --- a/tests/dictionaries/70container_save/tiramisu/base.py +++ b/tests/dictionaries/70container_save/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_serviceaccess/tiramisu/base.py b/tests/dictionaries/70container_serviceaccess/tiramisu/base.py index f0305311..f2c96bf6 100644 --- a/tests/dictionaries/70container_serviceaccess/tiramisu/base.py +++ b/tests/dictionaries/70container_serviceaccess/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_servicerestriction/tiramisu/base.py b/tests/dictionaries/70container_servicerestriction/tiramisu/base.py index 2d3a793b..0f139ece 100644 --- a/tests/dictionaries/70container_servicerestriction/tiramisu/base.py +++ b/tests/dictionaries/70container_servicerestriction/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70container_services/tiramisu/base.py b/tests/dictionaries/70container_services/tiramisu/base.py index ab392227..0be8be13 100644 --- a/tests/dictionaries/70container_services/tiramisu/base.py +++ b/tests/dictionaries/70container_services/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/dictionaries/70services_unmanage/tiramisu/base.py b/tests/dictionaries/70services_unmanage/tiramisu/base.py index ae77a044..024306ef 100644 --- a/tests/dictionaries/70services_unmanage/tiramisu/base.py +++ b/tests/dictionaries/70services_unmanage/tiramisu/base.py @@ -1,10 +1,13 @@ +import imp +func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') +for key, value in dict(locals()).items(): + if key != ['imp', 'func']: + setattr(func, key, value) try: from tiramisu3 import * except: from tiramisu import * from rougail.tiramisu import ConvertDynOptionDescription -import imp -func = imp.load_source('func', 'tests/dictionaries/../eosfunc/test.py') option_3 = ChoiceOption(properties=frozenset({'force_default_on_freeze', 'frozen', 'hidden', 'mandatory', 'normal'}), name='mode_conteneur_actif', doc='No change', multi=False, default='oui', values=('oui', 'non')) option_2 = OptionDescription(name='general', doc='général', properties=frozenset({'normal'}), children=[option_3]) option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2]) diff --git a/tests/test_1_flattener.py b/tests/test_1_flattener.py index d192702f..24abbc1f 100644 --- a/tests/test_1_flattener.py +++ b/tests/test_1_flattener.py @@ -30,6 +30,8 @@ test_raise -= excludes #test_ok = ['10leadership_autoleader'] #test_raise = [] +debug = False +#debug = True test_ok = list(test_ok) test_raise = list(test_raise) @@ -65,8 +67,6 @@ def compare_xml(exported_xmlfile, expected_xmlfile): def launch_flattener(test_dir, test_ok=False): - debug = False - #debug = True eolobj = objspace.CreoleObjSpace(Config['dtdfilename']) dirs = [test_dir] subfolder = join(test_dir, 'subfolder')