同步仿真框架并接入AMESim气动组件
This commit is contained in:
1 parent
420bafeb4e
commit
db4bdb4b70
109 files changed
+26920
-420
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