test index param
This commit is contained in:
parent
2e16bc2b90
commit
88f5b20aa9
4 changed files with 14 additions and 1 deletions
|
@ -87,7 +87,7 @@ class ParamAnnotator:
|
||||||
elif param.type == 'index':
|
elif param.type == 'index':
|
||||||
for target in obj.target:
|
for target in obj.target:
|
||||||
if not self.objectspace.paths.is_follower(target.name.path):
|
if not self.objectspace.paths.is_follower(target.name.path):
|
||||||
msg = _(f'"{param.type}" parameter cannot be set with target "{target.name}"'
|
msg = _(f'"{param.type}" parameter cannot be set with target "{target.name.name}"'
|
||||||
f' which is not a follower variable')
|
f' which is not a follower variable')
|
||||||
raise DictConsistencyError(msg, 60, obj.xmlfiles)
|
raise DictConsistencyError(msg, 60, obj.xmlfiles)
|
||||||
pass
|
pass
|
||||||
|
|
13
tests/dictionaries/80no_leadership_index/00-base.xml
Normal file
13
tests/dictionaries/80no_leadership_index/00-base.xml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<rougail>
|
||||||
|
<variables>
|
||||||
|
<variable name="my_variable"/>
|
||||||
|
</variables>
|
||||||
|
|
||||||
|
<constraints>
|
||||||
|
<fill name="calc_val">
|
||||||
|
<param type="index"/>
|
||||||
|
<target>my_variable</target>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
</rougail>
|
0
tests/dictionaries/80no_leadership_index/__init__.py
Normal file
0
tests/dictionaries/80no_leadership_index/__init__.py
Normal file
0
tests/dictionaries/80no_leadership_index/errno_60
Normal file
0
tests/dictionaries/80no_leadership_index/errno_60
Normal file
Loading…
Reference in a new issue