blob: f944130d70349b6bec31d7ed54776729b42f3065 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from __future__ import annotations
import pytest
from gap_pipeline.store import RunStore
def test_store_refuses_conflicting_overwrite(tmp_path) -> None:
store = RunStore(tmp_path, "item")
store.write_json("artifact.json", {"value": 1})
store.write_json("artifact.json", {"value": 1})
with pytest.raises(FileExistsError, match="refusing to overwrite"):
store.write_json("artifact.json", {"value": 2})
|