diff options
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index 454082e..157efa1 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -679,6 +679,10 @@ class UnpackIteratorTest(unittest.TestCase): with self.assertRaises(struct.error): s.iter_unpack(b"12") + def test_uninstantiable(self): + iter_unpack_type = type(struct.Struct(">ibcp").iter_unpack(b"")) + self.assertRaises(TypeError, iter_unpack_type) + def test_iterate(self): s = struct.Struct('>IB') b = bytes(range(1, 16)) |