diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-10-21 18:59:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-21 18:59:23 (GMT) |
commit | 73c4708630f99b94c35476529748629fff1fc63e (patch) | |
tree | a7a945c3bd322218e2587fd8d2eb08f1e130a0a5 /Lib | |
parent | db60a5bfa5d5f7a6f1538cc1fe76f0fda57b524e (diff) | |
download | cpython-73c4708630f99b94c35476529748629fff1fc63e.zip cpython-73c4708630f99b94c35476529748629fff1fc63e.tar.gz cpython-73c4708630f99b94c35476529748629fff1fc63e.tar.bz2 |
Fix bytes warnings in test_struct (added in bpo-29802). (#4068)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_struct.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index a896468..8fd56c9 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') |