Commit 73c47086 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

Fix bytes warnings in test_struct (added in bpo-29802). (#4068)

parent db60a5bf
......@@ -614,9 +614,9 @@ class StructTest(unittest.TestCase):
# the Struct object was decrefed twice and the reference to
# deallocated object was left in a cache.
with self.assertRaises(TypeError):
struct.unpack(b'b', 0)
struct.unpack('b', 0)
# Shouldn't crash.
self.assertEqual(struct.unpack(b'b', b'a'), (b'a'[0],))
self.assertEqual(struct.unpack('b', b'a'), (b'a'[0],))
def test_format_attr(self):
s = struct.Struct('=i2H')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment