diff options
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r-- | Lib/test/test_struct.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py index db6a97d..34596e0 100644 --- a/Lib/test/test_struct.py +++ b/Lib/test/test_struct.py @@ -560,11 +560,11 @@ def test_unpack_from(): test_string = b'abcd01234' fmt = '4s' s = struct.Struct(fmt) - for cls in (buffer, bytes): + for cls in (bytes, bytearray): if verbose: print("test_unpack_from using", cls.__name__) data = cls(test_string) - if not isinstance(data, (buffer, bytes)): + if not isinstance(data, (bytes, bytearray)): bytes_data = bytes(data, 'latin1') else: bytes_data = data @@ -575,7 +575,7 @@ def test_unpack_from(): vereq(s.unpack_from(data, i), (bytes_data[i:i+4],)) for i in range(6, len(test_string) + 1): simple_err(s.unpack_from, data, i) - for cls in (buffer, bytes): + for cls in (bytes, bytearray): data = cls(test_string) vereq(struct.unpack_from(fmt, data), (b'abcd',)) vereq(struct.unpack_from(fmt, data, 2), (b'cd01',)) |