summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index 6b1f22f..c76649c 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -774,6 +774,10 @@ class StructTest(unittest.TestCase):
test_error_propagation('N')
test_error_propagation('n')
+ def test_repr(self):
+ s = struct.Struct('=i2H')
+ self.assertEqual(repr(s), f'Struct({s.format!r})')
+
class UnpackIteratorTest(unittest.TestCase):
"""
Tests for iterative unpacking (struct.Struct.iter_unpack).