Files
SystemSimulationApp/tests/test_simulation_paths.py
lujingze b435daecf2 完善通用求解器回归与前端交互
- 引入因果坐标内核、热流体恢复和递进长时回归\n- 完善正交连线、线桥、视图保持与结果曲线缩放\n- 补充依赖约束、CI、测试基线和北京时间更新日志
2026-08-18 06:42:07 +00:00

32 lines
933 B
Python

from __future__ import annotations
import unittest
from app.simulation.examples.testmodel.run import prepare_testmodel_run
from app.simulation.paths import (
PROJECT_ROOT,
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 = PROJECT_ROOT / "tests" / "data" / "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()