规范仿真模型库并完善前端交互
归档仿真模型并补充组件目录、建模规范与校验。 完善控制台、默认节点、视图适配及前端自动化测试。
This commit is contained in:
1 parent
f7f1078911
commit
bbc88a6bbb
71 files changed
+4574
-806
No files matched your search
@@ -0,0 +1,32 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from app.simulation.examples.testmodel.run import prepare_testmodel_run
|
||||
from app.simulation.paths import (
|
||||
PROJECT_ROOT,
|
||||
SIMULATION_BASELINES_DIR,
|
||||
SIMULATION_RUNS_DIR,
|
||||
)
|
||||
|
||||
|
||||
class SimulationPathTests(unittest.TestCase):
|
||||
def test_default_run_paths_are_independent_of_module_depth(self) -> None:
|
||||
prepared = prepare_testmodel_run()
|
||||
|
||||
self.assertEqual(prepared.repo_root, PROJECT_ROOT)
|
||||
self.assertEqual(prepared.output_dir.parent, SIMULATION_RUNS_DIR)
|
||||
|
||||
def test_testmodel_baselines_live_with_the_test_assets(self) -> None:
|
||||
baseline_dir = SIMULATION_BASELINES_DIR / "testmodel"
|
||||
|
||||
self.assertTrue((baseline_dir / "testmodel_primary_series.csv").is_file())
|
||||
self.assertTrue(
|
||||
(
|
||||
baseline_dir / "testmodel_modelica_comparison_summary.txt"
|
||||
).is_file()
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user