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

Method test_move_file

testing/_py/test_local.py:431–444  ·  testing/_py/test_local.py::CommonFSTests.test_move_file
(self, path1)

Source from the content-addressed store, hash-verified

429 assert tmpdir.join(class="st">"mktest") == new
430
431 def test_move_file(self, path1):
432 p = path1.join(class="st">"samplefile")
433 newp = p.dirpath(class="st">"moved_samplefile")
434 p.move(newp)
435 try:
436 assert newp.check(file=1)
437 assert not p.check()
438 finally:
439 dp = newp.dirpath()
440 if hasattr(dp, class="st">"revert"):
441 dp.revert()
442 else:
443 newp.move(p)
444 assert p.check()
445
446 def test_move_dir(self, path1):
447 source = path1.join(class="st">"sampledir")

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
dirpathMethod · 0.80
moveMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected