MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / test_atomic_write_text_replaces_file

Function test_atomic_write_text_replaces_file

tests/test_locks.py:80–86  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

78
79
80def test_atomic_write_text_replaces_file(tmp_path):
81 target = tmp_path / "nested" / "file.txt"
82 atomic_write_text(target, "first")
83 atomic_write_text(target, "second")
84
85 assert target.read_text(encoding="utf-8") == "second"
86 assert list(target.parent.glob("*.tmp")) == []
87
88
89def test_atomic_write_text_preserves_existing_mode(tmp_path):

Callers

nothing calls this directly

Calls 1

atomic_write_textFunction · 0.90

Tested by

no test coverage detected