From 73c4708630f99b94c35476529748629fff1fc63e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 21 Oct 2017 21:59:23 +0300 Subject: [PATCH] Fix bytes warnings in test_struct (added in bpo-29802). (#4068) --- Lib/test/test_struct.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') -- 2.40.0