from importlib.machinery import SourceFileLoader as _SourceFileLoader from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec class func: pass def _load_functions(path): global _SourceFileLoader, _spec_from_loader, _module_from_spec, func loader = _SourceFileLoader('func', path) spec = _spec_from_loader(loader.name, loader) func_ = _module_from_spec(spec) loader.exec_module(func_) for function in dir(func_): if function.startswith('_'): continue setattr(func, function, getattr(func_, function)) _load_functions('tests/dictionaries/../eosfunc/test.py') try: from tiramisu3 import * except: from tiramisu import * option_4 = BoolOption(name="server_deployed", doc="server_deployed", default=False, properties=frozenset({"hidden", "mandatory", "normal"})) option_2 = StrOption(name="my_var", doc="my_var", default="no", properties=frozenset({"basic", "force_store_value", "mandatory", Calculation(func.calc_value, Params(ParamValue('frozen'), kwargs={'condition': ParamOption(option_4, todict=True, notraisepropertyerror=True), 'expected': ParamValue(True)}))})) option_3 = StrOption(name="my_var1", doc="my_var1", default="no", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"})) optiondescription_1 = OptionDescription(name="general", doc="général", children=[option_2, option_3, option_4], properties=frozenset({"basic"})) optiondescription_11 = OptionDescription(name="rougail", doc="Rougail", children=[optiondescription_1]) option_6 = StrOption(name="description", doc="description", default="Exportation de la base de ejabberd", properties=frozenset({"mandatory", "normal"})) option_7 = ChoiceOption(name="day", doc="day", values=('none', 'daily', 'weekly', 'monthly'), default="none", properties=frozenset({"mandatory", "normal"})) option_8 = ChoiceOption(name="mode", doc="mode", values=('pre', 'post'), default="pre", properties=frozenset({"mandatory", "normal"})) optiondescription_5 = OptionDescription(name="ejabberd", doc="ejabberd", children=[option_6, option_7, option_8], properties=frozenset({"normal"})) optiondescription_12 = OptionDescription(name="extra", doc="extra", children=[optiondescription_5]) option_10 = StrOption(name="description", doc="description", default="test", properties=frozenset({"mandatory", "normal"})) optiondescription_9 = OptionDescription(name="external", doc="external", children=[option_10], properties=frozenset({"normal", Calculation(func.calc_value, Params(ParamValue('disabled'), kwargs={'condition': ParamOption(option_6, todict=True, notraisepropertyerror=True), 'expected': ParamValue("non")}))})) optiondescription_13 = OptionDescription(name="extra1", doc="extra1", children=[optiondescription_9]) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_11, optiondescription_12, optiondescription_13])