MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_create

Method test_create

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

Source from the content-addressed store, hash-verified

2038 os_helper.unlink(cls.file_path)
2039
2040 def test_create(self):
2041 with tarfile.open(tmpname, self.mode) as tobj:
2042 tobj.add(self.file_path)
2043
2044 with self.taropen(tmpname) as tobj:
2045 names = tobj.getnames()
2046 self.assertEqual(len(names), 1)
2047 self.assertIn('spameggs42', names[0])
2048
2049 def test_create_existing(self):
2050 with tarfile.open(tmpname, self.mode) as tobj:

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected