(tmp_path)
| 87 | |
| 88 | |
| 89 | def test_atomic_write_text_preserves_existing_mode(tmp_path): |
| 90 | target = tmp_path / "file.txt" |
| 91 | target.write_text("first", encoding="utf-8") |
| 92 | target.chmod(0o640) |
| 93 | |
| 94 | atomic_write_text(target, "second") |
| 95 | |
| 96 | assert target.read_text(encoding="utf-8") == "second" |
| 97 | assert stat.S_IMODE(target.stat().st_mode) == 0o640 |
| 98 | |
| 99 | |
| 100 | def test_atomic_write_json_replaces_file(tmp_path): |
nothing calls this directly
no test coverage detected