每个测试前后重置 api 模块的 _saved_snapshot。
(self)
| 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。""" |
nothing calls this directly
no outgoing calls
no test coverage detected