(self)
| 667 | struct.unpack_from('<I', bytearray(10), sys.maxsize) |
| 668 | |
| 669 | def test_issue29802(self): |
| 670 | # When the second argument of struct.unpack() was of wrong type |
| 671 | # the Struct object was decrefed twice and the reference to |
| 672 | # deallocated object was left in a cache. |
| 673 | with self.assertRaises(TypeError): |
| 674 | struct.unpack('b', 0) |
| 675 | # Shouldn't crash. |
| 676 | self.assertEqual(struct.unpack('b', b'a'), (b'a'[0],)) |
| 677 | |
| 678 | def test_format_attr(self): |
| 679 | s = struct.Struct('=i2H') |
nothing calls this directly
no test coverage detected