MCPcopy Create free account
hub / github.com/Tong89/smartNode / test_load_scenario

Method test_load_scenario

tests/test_store.py:69–75  ·  view source on GitHub ↗
(self, engine, store)

Source from the content-addressed store, hash-verified

67 assert {"场景A", "场景B"} == names
68
69 def test_load_scenario(self, engine, store):
70 store.save_scenario("基准", engine, _mock_stats())
71 rec = store.load_scenario("基准")
72 assert rec is not None
73 assert rec["name"] == "基准"
74 assert "run_stats" in rec
75 assert rec["run_stats"]["decision_metrics"]["acceptance_rate"] == pytest.approx(0.8)
76
77 def test_load_missing(self, store):
78 assert store.load_scenario("不存在") is None

Callers

nothing calls this directly

Calls 3

_mock_statsFunction · 0.85
save_scenarioMethod · 0.80
load_scenarioMethod · 0.80

Tested by

no test coverage detected