]> granicus.if.org Git - python/commitdiff
Fix bytes warnings in test_struct (added in bpo-29802). (#4068)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 21 Oct 2017 18:59:23 +0000 (21:59 +0300)
committerGitHub <noreply@github.com>
Sat, 21 Oct 2017 18:59:23 +0000 (21:59 +0300)
Lib/test/test_struct.py

index a896468848e4fd309398825b7dcb63ed332a2a01..8fd56c91cb7a4d5550e099add712c7accda7a891 100644 (file)
@@ -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')