Bound semantic map publication and define experiment storage closeout
This commit is contained in:
@@ -100,18 +100,18 @@ def test_pair_failure_preserves_pointer_and_ordinary_save_clears_raw(tmp_path, m
|
||||
world, model, maps, _, _ = make_setup(tmp_path)
|
||||
raw, auto = pair(model)
|
||||
previous = maps.versions(world)
|
||||
original = maps.store_immutable
|
||||
original = maps._write_immutable
|
||||
|
||||
def fail_second(world, document):
|
||||
def fail_second(world, document, sha):
|
||||
if document.get("semantic_stage") == "algorithmic":
|
||||
raise OSError("interrupted")
|
||||
return original(world, document)
|
||||
return original(world, document, sha)
|
||||
|
||||
monkeypatch.setattr(maps, "store_immutable", fail_second)
|
||||
monkeypatch.setattr(maps, "_write_immutable", fail_second)
|
||||
with pytest.raises(OSError):
|
||||
maps.publish_pair(world, raw, auto)
|
||||
assert maps.versions(world) == previous
|
||||
monkeypatch.setattr(maps, "store_immutable", original)
|
||||
monkeypatch.setattr(maps, "_write_immutable", original)
|
||||
maps.publish_pair(world, raw, auto)
|
||||
maps.save(world, model)
|
||||
assert "raw_sha256" not in maps.versions(world)
|
||||
|
||||
Reference in New Issue
Block a user