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

Method _copy_file

Lib/test/test_shutil.py:1346–1354  ·  view source on GitHub ↗
(self, method)

Source from the content-addressed store, hash-verified

1344 ### shutil.copy
1345
1346 def _copy_file(self, method):
1347 fname = 'test.txt'
1348 tmpdir = self.mkdtemp()
1349 create_file((tmpdir, fname), 'xxx')
1350 file1 = os.path.join(tmpdir, fname)
1351 tmpdir2 = self.mkdtemp()
1352 method(file1, tmpdir2)
1353 file2 = os.path.join(tmpdir2, fname)
1354 return (file1, file2)
1355
1356 def test_copy(self):
1357 # Ensure that the copied file exists and has the same mode bits.

Callers 2

test_copyMethod · 0.95
test_copy2Method · 0.95

Calls 4

methodFunction · 0.85
mkdtempMethod · 0.80
create_fileFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected