mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
Fix bytes warnings in test_struct (added in bpo-29802). (#4068)
This commit is contained in:
parent
db60a5bfa5
commit
73c4708630
1 changed files with 2 additions and 2 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue