check without parameter
This commit is contained in:
parent
5f2d1b3eb7
commit
00a69e72a2
@ -642,8 +642,8 @@ class ConstraintAnnotator:
|
||||
|
||||
def check_replace_text(self):
|
||||
for check_idx, check in enumerate(self.objectspace.space.constraints.check):
|
||||
namespace = check.namespace
|
||||
if hasattr(check, 'param'):
|
||||
namespace = check.namespace
|
||||
for idx, param in enumerate(check.param):
|
||||
if param.type == 'variable':
|
||||
param.text = self.objectspace.paths.get_variable_path(param.text, namespace)
|
||||
|
24
tests/flattener_dicos/10check_no_param/00-base.xml
Normal file
24
tests/flattener_dicos/10check_no_param/00-base.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
|
||||
<services/>
|
||||
|
||||
<variables>
|
||||
<family name="general">
|
||||
<variable name="mode_conteneur_actif" type="string" description="No change">
|
||||
<value>b</value>
|
||||
</variable>
|
||||
<variable name="int" type="number" description="No change"/>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<check name="valid_entier" target="int"/>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</rougail>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
0
tests/flattener_dicos/10check_no_param/__init__.py
Normal file
0
tests/flattener_dicos/10check_no_param/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
{"rougail.general.mode_conteneur_actif": "b", "rougail.general.int": null}
|
9
tests/flattener_dicos/10check_no_param/tiramisu/base.py
Normal file
9
tests/flattener_dicos/10check_no_param/tiramisu/base.py
Normal file
@ -0,0 +1,9 @@
|
||||
from tiramisu import *
|
||||
from rougail.tiramisu import ConvertDynOptionDescription
|
||||
import imp
|
||||
func = imp.load_source('func', 'tests/flattener_dicos/../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_entier, 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])
|
||||
option_1 = OptionDescription(name='rougail', doc='rougail', children=[option_2])
|
||||
option_0 = OptionDescription(name='baseoption', doc='baseoption', children=[option_1])
|
Loading…
Reference in New Issue
Block a user