From: Serhiy Storchaka Date: Sat, 21 Oct 2017 18:59:23 +0000 (+0300) Subject: Fix bytes warnings in test_struct (added in bpo-29802). (#4068) X-Git-Tag: v3.7.0a3~335 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73c4708630f99b94c35476529748629fff1fc63e;p=python Fix bytes warnings in test_struct (added in bpo-29802). (#4068) --- diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index a896468848..8fd56c91cb 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -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')