from tiramisu import * from tiramisu.setting import ALLOWED_LEADER_PROPERTIES from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription load_functions('tests/dictionaries/../eosfunc/test.py') ALLOWED_LEADER_PROPERTIES.add("basic") ALLOWED_LEADER_PROPERTIES.add("standard") ALLOWED_LEADER_PROPERTIES.add("advanced") dict_env['disabled_rougail.my_var2'] = "{% if my_var1 is not defined %}\nmy_var1 is undefined!\n{% elif my_var1 == \"no\" %}\nmy_var1 is no\n{% endif %}\n" dict_env['disabled_rougail.my_var3'] = "{% if my_var2 is not defined %}\nmy_var2 is undefined!\n{% elif my_var2 == \"no\" %}\nmy_var2 is no\n{% endif %}\n" option_2 = StrOption(name="my_var1", doc="my_var1", default="no", properties=frozenset({"mandatory", "standard"})) option_3 = StrOption(name="my_var2", doc="my_var2", default="no", properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.my_var2"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), 'my_var1': ParamOption(option_2, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])})) option_4 = StrOption(name="my_var3", doc="my_var3", default="no", properties=frozenset({"mandatory", "standard", Calculation(func['jinja_to_property'], Params((ParamValue("disabled")), kwargs={'__internal_jinja': ParamValue("disabled_rougail.my_var3"), '__internal_type': ParamValue("string"), '__internal_multi': ParamValue(False), 'my_var2': ParamOption(option_3, notraisepropertyerror=True)}), help_function=func['jinja_to_property_help'])})) optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3, option_4], properties=frozenset({"standard"})) option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])