Test _replace_md5.
(tmp_path)
| 608 | |
| 609 | |
| 610 | def test_replace_md5(tmp_path): |
| 611 | """Test _replace_md5.""" |
| 612 | old = tmp_path / "test" |
| 613 | new = old.with_suffix(".new") |
| 614 | old.write_text("abcd") |
| 615 | new.write_text("abcde") |
| 616 | assert old.is_file() |
| 617 | assert new.is_file() |
| 618 | _replace_md5(str(new)) |
| 619 | assert not new.is_file() |
| 620 | assert old.read_text() == "abcde" |
| 621 | new.write_text(old.read_text()) |
| 622 | _replace_md5(str(new)) |
| 623 | assert old.read_text() == "abcde" |
| 624 | assert not new.is_file() |
nothing calls this directly
no test coverage detected