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

Method test_create

Lib/test/test_tarfile.py:2057–2064  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2055 os_helper.unlink(cls.file_path)
2056
2057 def test_create(self):
2058 with tarfile.open(tmpname, self.mode) as tobj:
2059 tobj.add(self.file_path)
2060
2061 with self.taropen(tmpname) as tobj:
2062 names = tobj.getnames()
2063 self.assertEqual(len(names), 1)
2064 self.assertIn('spameggs42', names[0])
2065
2066 def test_create_existing(self):
2067 with tarfile.open(tmpname, self.mode) as tobj:

Callers

nothing calls this directly

Calls 6

taropenMethod · 0.80
getnamesMethod · 0.80
assertInMethod · 0.80
openMethod · 0.45
addMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected