MCPcopy Index your code
hub / github.com/python/cpython / _check_move_file

Method _check_move_file

Lib/test/test_shutil.py:2746–2752  ·  view source on GitHub ↗
(self, src, dst, real_dst)

Source from the content-addressed store, hash-verified

2744 create_file(self.src_file, b"spam")
2745
2746 def _check_move_file(self, src, dst, real_dst):
2747 with open(src, "rb") as f:
2748 contents = f.read()
2749 shutil.move(src, dst)
2750 with open(real_dst, "rb") as f:
2751 self.assertEqual(contents, f.read())
2752 self.assertFalse(os.path.exists(src))
2753
2754 def _check_move_dir(self, src, dst, real_dst):
2755 contents = sorted(os.listdir(src))

Calls 6

assertFalseMethod · 0.80
openFunction · 0.50
readMethod · 0.45
moveMethod · 0.45
assertEqualMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected