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

Method test_count_overflow

Lib/test/test_struct.py:551–556  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

549 self.assertTrue(struct.unpack('@?', c)[0])
550
551 def test_count_overflow(self):
552 hugecount = '{}b'.format(sys.maxsize+1)
553 self.assertRaises(struct.error, struct.calcsize, hugecount)
554
555 hugecount2 = '{}b{}H'.format(sys.maxsize//2, sys.maxsize//2)
556 self.assertRaises(struct.error, struct.calcsize, hugecount2)
557
558 def test_trailing_counter(self):
559 store = array.array('b', b' '*100)

Callers

nothing calls this directly

Calls 2

formatMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected