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

Method test_overwrite_file_as_file

Lib/test/archiver_tests.py:26–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24
25
26 def test_overwrite_file_as_file(self):
27 target = os.path.join(self.testdir, 'test')
28 self.create_file(target, b'content')
29 with self.open(self.ar_with_file) as ar:
30 self.extractall(ar)
31 self.assertTrue(os.path.isfile(target))
32 with open(target, 'rb') as f:
33 self.assertEqual(f.read(), b'newcontent')
34
35 def test_overwrite_dir_as_dir(self):
36 target = os.path.join(self.testdir, 'test')

Callers

nothing calls this directly

Calls 9

create_fileMethod · 0.95
openMethod · 0.95
extractallMethod · 0.95
assertTrueMethod · 0.80
openFunction · 0.50
joinMethod · 0.45
isfileMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected