MCPcopy
hub / github.com/pytest-dev/pytest / test_rm_rf

Method test_rm_rf

testing/test_tmpdir.py:526–538  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

524
525class TestRmRf:
526 def test_rm_rf(self, tmp_path):
527 adir = tmp_path / "adir"
528 adir.mkdir()
529 rm_rf(adir)
530
531 assert not adir.exists()
532
533 adir.mkdir()
534 afile = adir / "afile"
535 afile.write_bytes(b"aa")
536
537 rm_rf(adir)
538 assert not adir.exists()
539
540 def test_rm_rf_with_read_only_file(self, tmp_path):
541 """Ensure rm_rf can remove directories with read-only files in them (#5524)"""

Callers

nothing calls this directly

Calls 3

rm_rfFunction · 0.90
mkdirMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected