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

Method test_copy_into

Lib/test/test_pathlib/test_copy.py:133–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

131 self.assertRaises(OSError, source.copy, target, follow_symlinks=False)
132
133 def test_copy_into(self):
134 source = self.source_root / 'fileA'
135 target_dir = self.target_root / 'dirA'
136 self.target_ground.create_dir(target_dir)
137 result = source.copy_into(target_dir)
138 self.assertEqual(result, target_dir / 'fileA')
139 self.assertTrue(self.target_ground.isfile(result))
140 self.assertEqual(self.source_ground.readbytes(source),
141 self.target_ground.readbytes(result))
142
143 def test_copy_into_empty_name(self):
144 source = self.source_root.with_segments()

Callers

nothing calls this directly

Calls 6

assertTrueMethod · 0.80
create_dirMethod · 0.45
copy_intoMethod · 0.45
assertEqualMethod · 0.45
isfileMethod · 0.45
readbytesMethod · 0.45

Tested by

no test coverage detected