完善AMESim可配置参数交互
补充气动孔口、动态管路、UD00 与弹性接触组件的离散选项、条件显示和折叠分组。 增加目录协议、非法选项和前端参数表交互回归测试,不修改现有求解公式。
This commit is contained in:
1 parent
be54070855
commit
df1d676131
12 files changed
+1262
-69
No files matched your search
@@ -280,6 +280,25 @@ class AmesimMechanicalPublicComponentTests(unittest.TestCase):
|
||||
{name: value},
|
||||
)
|
||||
|
||||
def test_lstp00a_registry_rejects_invalid_choice_values(self) -> None:
|
||||
invalid_options = {
|
||||
"stiffmode": (0.0, 1.5, 3.0),
|
||||
"discContactOption": (0.0, 1.5, 3.0),
|
||||
}
|
||||
|
||||
for name, values in invalid_options.items():
|
||||
for value in values:
|
||||
with self.subTest(name=name, value=value):
|
||||
with self.assertRaisesRegex(
|
||||
ValueError,
|
||||
"must be (?:one of|at least|at most)",
|
||||
):
|
||||
COMPONENT_MODEL_REGISTRY["amesim_lstp00a"].create(
|
||||
"contact_1",
|
||||
self.medium,
|
||||
{name: value},
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user