同步仿真框架并接入AMESim气动组件
This commit is contained in:
1 parent
420bafeb4e
commit
db4bdb4b70
109 files changed
+26920
-420
No files matched your search
@@ -0,0 +1,41 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from PythonModels.systems import test_mql
|
||||
|
||||
|
||||
MATRIX_PATH = Path(__file__).resolve().parents[1] / "docs" / "amesim-component-migration-matrix.md"
|
||||
|
||||
|
||||
class AmesimComponentMigrationMatrixTests(unittest.TestCase):
|
||||
def test_matrix_covers_every_test_mql_submodel_family(self) -> None:
|
||||
text = MATRIX_PATH.read_text(encoding="utf-8")
|
||||
families = set(test_mql.SUBMODEL_COUNTS) | set(test_mql.LINE_SUBMODEL_COUNTS)
|
||||
|
||||
missing = sorted(family for family in families if f"`{family}`" not in text)
|
||||
|
||||
self.assertEqual(missing, [])
|
||||
|
||||
def test_unsupported_domains_are_not_marked_as_public_candidates(self) -> None:
|
||||
text = MATRIX_PATH.read_text(encoding="utf-8")
|
||||
unsupported = {
|
||||
"F000",
|
||||
"FORC",
|
||||
"LMECHN1",
|
||||
"LSTP00A",
|
||||
"MECMAS21",
|
||||
"PNRP17",
|
||||
"STEP0",
|
||||
"UD00",
|
||||
}
|
||||
|
||||
for family in unsupported:
|
||||
with self.subTest(family=family):
|
||||
row = next(line for line in text.splitlines() if f"`{family}`" in line)
|
||||
self.assertIn("暂不公开", row)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user