MCPcopy
hub / github.com/mne-tools/mne-python / test_replace_md5

Function test_replace_md5

mne/utils/tests/test_numerics.py:610–624  ·  view source on GitHub ↗

Test _replace_md5.

(tmp_path)

Source from the content-addressed store, hash-verified

608
609
610def 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()

Callers

nothing calls this directly

Calls 1

_replace_md5Function · 0.90

Tested by

no test coverage detected