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

Method test_copy_file

testing/_py/test_local.py:371–383  ·  testing/_py/test_local.py::CommonFSTests.test_copy_file
(self, path1)

Source from the content-addressed store, hash-verified

369 assert chk(path1.join(class="st">"somepickle"))
370
371 def test_copy_file(self, path1):
372 otherdir = path1.join(class="st">"otherdir")
373 initpy = otherdir.join(class="st">"__init__.py")
374 copied = otherdir.join(class="st">"copied")
375 initpy.copy(copied)
376 try:
377 assert copied.check()
378 s1 = initpy.read_text(encoding=class="st">"utf-8")
379 s2 = copied.read_text(encoding=class="st">"utf-8")
380 assert s1 == s2
381 finally:
382 if copied.check():
383 copied.remove()
384
385 def test_copy_dir(self, path1):
386 otherdir = path1.join(class="st">"otherdir")

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