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

Method test_gnu_limits

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

Source from the content-addressed store, hash-verified

2679 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.USTAR_FORMAT)
2680
2681 def test_gnu_limits(self):
2682 tarinfo = tarfile.TarInfo("123/" * 126 + "longname")
2683 tarinfo.tobuf(tarfile.GNU_FORMAT)
2684
2685 tarinfo = tarfile.TarInfo("longlink")
2686 tarinfo.linkname = "123/" * 126 + "longname"
2687 tarinfo.tobuf(tarfile.GNU_FORMAT)
2688
2689 # uid >= 256 ** 7
2690 tarinfo = tarfile.TarInfo("name")
2691 tarinfo.uid = 0o4000000000000000000
2692 self.assertRaises(ValueError, tarinfo.tobuf, tarfile.GNU_FORMAT)
2693
2694 def test_pax_limits(self):
2695 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