rougail/tests/dictionaries_old/01base_file_mode2/tiramisu/multi.py

51 lines
3.1 KiB
Python
Raw Permalink Normal View History

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:
2023-06-19 17:41:38 +02:00
from tiramisu4 import *
2023-09-04 19:18:40 +02:00
from tiramisu4.setting import ALLOWED_LEADER_PROPERTIES
except:
from tiramisu import *
2023-09-04 19:18:40 +02:00
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("normal")
ALLOWED_LEADER_PROPERTIES.add("expert")
option_5 = FilenameOption(name="name", doc="name", default="/etc/file")
option_6 = StrOption(name="source", doc="source", default="file")
option_4 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_3 = OptionDescription(name="file", doc="file", children=[option_5, option_6, option_4])
optiondescription_3.impl_set_information('mode', 1755)
optiondescription_2 = OptionDescription(name="files", doc="files", children=[optiondescription_3])
option_1 = BoolOption(name="activate", doc="activate", default=True)
option_7 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_17 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_2, option_1, option_7])
optiondescription_17.impl_set_information('type', "service")
optiondescription_16 = OptionDescription(name="services", doc="services", children=[optiondescription_17], properties=frozenset({"hidden"}))
optiondescription_15 = OptionDescription(name="1", doc="1", children=[optiondescription_16])
option_12 = FilenameOption(name="name", doc="name", default="/etc/file")
option_13 = StrOption(name="source", doc="source", default="file")
option_11 = BoolOption(name="activate", doc="activate", default=True)
optiondescription_10 = OptionDescription(name="file", doc="file", children=[option_12, option_13, option_11])
optiondescription_10.impl_set_information('mode', 1755)
optiondescription_9 = OptionDescription(name="files", doc="files", children=[optiondescription_10])
option_8 = BoolOption(name="activate", doc="activate", default=True)
option_14 = BoolOption(name="manage", doc="manage", default=True)
optiondescription_20 = OptionDescription(name="test_service", doc="test.service", children=[optiondescription_9, option_8, option_14])
optiondescription_20.impl_set_information('type', "service")
optiondescription_19 = OptionDescription(name="services", doc="services", children=[optiondescription_20], properties=frozenset({"hidden"}))
optiondescription_18 = OptionDescription(name="2", doc="2", children=[optiondescription_19])
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_15, optiondescription_18])