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

Method test_gnu_limits

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

Source from the content-addressed store, hash-verified

2662 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
2663
2664 def test_gnu_limits(self):
2665 tarinfo = tarfile.TarInfo("123/" * 126 + "longname")
2666 tarinfo.tobuf(tarfile.GNU_FORMAT)
2667
2668 tarinfo = tarfile.TarInfo("longlink")
2669 tarinfo.linkname = "123/" * 126 + "longname"
2670 tarinfo.tobuf(tarfile.GNU_FORMAT)
2671
2672 # uid >= 256 ** 7
2673 tarinfo = tarfile.TarInfo("name")
2674 tarinfo.uid = 0o4000000000000000000
2675 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.GNU_FORMAT)
2676
2677 def test_pax_limits(self):
2678 tarinfo = tarfile.TarInfo("123/" * 126 + "longname")

Callers

nothing calls this directly

Calls 2

tobufMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected