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

Method test_non_existent_src

Lib/test/test_shutil.py:3226–3230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3224 self.assertEqual(read_file(TESTFN, binary=True), self.FILEDATA)
3225
3226 def test_non_existent_src(self):
3227 name = tempfile.mktemp(dir=os.getcwd())
3228 with self.assertRaises(FileNotFoundError) as cm:
3229 shutil.copyfile(name, "new")
3230 self.assertEqual(cm.exception.filename, name)
3231
3232 def test_empty_file(self):
3233 srcname = TESTFN + 'src'

Callers

nothing calls this directly

Calls 4

mktempMethod · 0.80
copyfileMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected