summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-21 19:29:53 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-21 19:29:53 (GMT)
commit254348e201647ad9d264de2cc0fde031e8214719 (patch)
treef5e6c42989ce114d4a9385404a6b23b2b1ff12af /Lib/test/test_struct.py
parent905a904723abadc627be60bf944e2ca76329b06e (diff)
downloadcpython-254348e201647ad9d264de2cc0fde031e8214719.zip
cpython-254348e201647ad9d264de2cc0fde031e8214719.tar.gz
cpython-254348e201647ad9d264de2cc0fde031e8214719.tar.bz2
Rename buffer -> bytearray.
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py6
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',))