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

Method test_tar_size

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

Source from the content-addressed store, hash-verified

1438 tar.close()
1439
1440 def test_tar_size(self):
1441 # Test for bug #1013882.
1442 tar = tarfile.open(tmpname, self.mode)
1443 try:
1444 path = os.path.join(TEMPDIR, "file")
1445 with open(path, "wb") as fobj:
1446 fobj.write(b"aaa")
1447 tar.add(path)
1448 finally:
1449 tar.close()
1450 self.assertGreater(os.path.getsize(tmpname), 0,
1451 "tarfile is empty")
1452
1453 # The test_*_size tests test for bug #1167128.
1454 def test_file_size(self):

Callers

nothing calls this directly

Calls 7

assertGreaterMethod · 0.80
openFunction · 0.50
openMethod · 0.45
joinMethod · 0.45
writeMethod · 0.45
addMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected