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

Method test_copy_dir

testing/_py/test_local.py:385–397  ·  testing/_py/test_local.py::CommonFSTests.test_copy_dir
(self, path1)

Source from the content-addressed store, hash-verified

383 copied.remove()
384
385 def test_copy_dir(self, path1):
386 otherdir = path1.join(class="st">"otherdir")
387 copied = path1.join(class="st">"newdir")
388 try:
389 otherdir.copy(copied)
390 assert copied.check(dir=1)
391 assert copied.join(class="st">"__init__.py").check(file=1)
392 s1 = otherdir.join(class="st">"__init__.py").read_text(encoding=class="st">"utf-8")
393 s2 = copied.join(class="st">"__init__.py").read_text(encoding=class="st">"utf-8")
394 assert s1 == s2
395 finally:
396 if copied.check(dir=1):
397 copied.remove(rec=1)
398
399 def test_remove_file(self, path1):
400 d = path1.ensure(class="st">"todeleted")

Callers

nothing calls this directly

Calls 5

joinMethod · 0.80
copyMethod · 0.80
read_textMethod · 0.80
removeMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected