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

Method test_deep_nesting

Lib/test/test_plistlib.py:981–993  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

979 self.assertIs(b['x'], b)
980
981 def test_deep_nesting(self):
982 for N in [50, 300, 100_000]:
983 chunks = [b'\xa1' + (i + 1).to_bytes(4, 'big') for i in range(N)]
984 try:
985 result = self.decode(*chunks, b'\x54seed', offset_size=4, ref_size=4)
986 except RecursionError:
987 self.assertGreater(N, sys.getrecursionlimit())
988 else:
989 for i in range(N):
990 self.assertIsInstance(result, list)
991 self.assertEqual(len(result), 1)
992 result = result[0]
993 self.assertEqual(result, 'seed')
994
995 def test_large_timestamp(self):
996 # Issue #26709: 32-bit timestamp out of range

Callers

nothing calls this directly

Calls 6

decodeMethod · 0.95
lenFunction · 0.85
to_bytesMethod · 0.80
assertGreaterMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected