update tests
This commit is contained in:
20
tests/dictionaries/02fill_multi_calc_val_multi/00-base.xml
Normal file
20
tests/dictionaries/02fill_multi_calc_val_multi/00-base.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail version="0.9">
|
||||
<variables>
|
||||
<variable name="var1" multi='True'>
|
||||
<value>no</value>
|
||||
<value>yes</value>
|
||||
<value>maybe</value>
|
||||
</variable>
|
||||
<variable name="var2" multi='True'/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<fill name="calc_value">
|
||||
<param type="variable">var1</param>
|
||||
<target>var2</target>
|
||||
</fill>
|
||||
</constraints>
|
||||
</rougail>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"rougail.var1": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
]
|
||||
},
|
||||
"rougail.var2": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"rougail.var1": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
],
|
||||
"rougail.var2": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
]
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"rougail.var1": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
]
|
||||
},
|
||||
"rougail.var2": {
|
||||
"owner": "default",
|
||||
"value": [
|
||||
"no",
|
||||
"yes",
|
||||
"maybe"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
from importlib.machinery import SourceFileLoader
|
||||
from importlib.util import spec_from_loader, module_from_spec
|
||||
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 key, value in dict(locals()).items():
|
||||
if key != ['SourceFileLoader', 'func']:
|
||||
setattr(func, key, value)
|
||||
try:
|
||||
from tiramisu3 import *
|
||||
except:
|
||||
from tiramisu import *
|
||||
option_2 = StrOption(name="var1", doc="var1", multi=True, default=['no', 'yes', 'maybe'], default_multi="no", properties=frozenset({"mandatory", "normal"}))
|
||||
option_3 = StrOption(name="var2", doc="var2", multi=True, default=Calculation(func.calc_value, Params((ParamOption(option_2)))), properties=frozenset({"normal"}))
|
||||
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2, option_3])
|
||||
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[option_1])
|
Reference in New Issue
Block a user