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

Method reset_snapshot

tests/test_snapshot.py:380–385  ·  view source on GitHub ↗

每个测试前后重置 api 模块的 _saved_snapshot。

(self)

Source from the content-addressed store, hash-verified

378
379 @pytest.fixture(autouse=True)
380 def reset_snapshot(self):
381 """每个测试前后重置 api 模块的 _saved_snapshot。"""
382 import backend.api as api_module
383 api_module._saved_snapshot = None
384 yield
385 api_module._saved_snapshot = None
386
387 def test_snapshot_status_no_snapshot(self, flask_client_engine):
388 """无快照时 /api/snapshot/status 返回 available=False。"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected