allow redefine 'multi' attribute
This commit is contained in:
parent
7409062d7f
commit
366ab9918b
7 changed files with 43 additions and 2 deletions
|
@ -38,7 +38,7 @@ FORCE_REDEFINABLES = ('family', 'follower', 'service', 'disknod', 'variables')
|
|||
# RougailObjSpace's elements that shall be forced to the UnRedefinable type
|
||||
FORCE_UNREDEFINABLES = ('value',)
|
||||
# RougailObjSpace's elements that shall not be modify
|
||||
UNREDEFINABLE = ('multi', 'type',)
|
||||
UNREDEFINABLE = ('type',)
|
||||
# RougailObjSpace's elements that did not created automaticly
|
||||
FORCE_ELEMENTS = ('property_', 'information')
|
||||
# XML text are convert has name
|
||||
|
|
8
tests/dictionaries/51redefine_multi/makedict/after.json
Normal file
8
tests/dictionaries/51redefine_multi/makedict/after.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"rougail.general.mode_conteneur_actif": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"non"
|
||||
]
|
||||
}
|
||||
}
|
5
tests/dictionaries/51redefine_multi/makedict/base.json
Normal file
5
tests/dictionaries/51redefine_multi/makedict/base.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"rougail.general.mode_conteneur_actif": [
|
||||
"non"
|
||||
]
|
||||
}
|
8
tests/dictionaries/51redefine_multi/makedict/before.json
Normal file
8
tests/dictionaries/51redefine_multi/makedict/before.json
Normal file
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"rougail.general.mode_conteneur_actif": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"non"
|
||||
]
|
||||
}
|
||||
}
|
20
tests/dictionaries/51redefine_multi/tiramisu/base.py
Normal file
20
tests/dictionaries/51redefine_multi/tiramisu/base.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
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
|
||||
_loader = _SourceFileLoader('func', 'tests/dictionaries/../eosfunc/test.py')
|
||||
_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))
|
||||
try:
|
||||
from tiramisu3 import *
|
||||
except:
|
||||
from tiramisu import *
|
||||
option_3 = StrOption(name="mode_conteneur_actif", doc="Redefine description", multi=True, default=['non'], default_multi="non", properties=frozenset({"force_default_on_freeze", "frozen", "hidden", "mandatory", "normal"}))
|
||||
option_2 = OptionDescription(name="general", doc="general", children=[option_3], properties=frozenset({"normal"}))
|
||||
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
|
||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
|
@ -29,7 +29,7 @@ excludes = set([])
|
|||
#excludes = set(['01base_file_utfchar'])
|
||||
test_ok -= excludes
|
||||
test_raise -= excludes
|
||||
#test_ok = ['00load_autofreeze']
|
||||
#test_ok = ['70container_filesredefine']
|
||||
#test_ok = []
|
||||
#test_raise = ['80auto_autofreeze']
|
||||
#test_raise = []
|
||||
|
|
Loading…
Reference in a new issue