[pypy-commit] pypy py3k: we no longer have buffers, but we have memoryview instead

antocuni noreply at buildbot.pypy.org
Thu Mar 22 11:03:21 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53882:ed773b252600
Date: 2012-03-22 09:54 +0100
http://bitbucket.org/pypy/pypy/changeset/ed773b252600/

Log:	we no longer have buffers, but we have memoryview instead

diff --git a/pypy/module/struct/test/test_struct.py b/pypy/module/struct/test/test_struct.py
--- a/pypy/module/struct/test/test_struct.py
+++ b/pypy/module/struct/test/test_struct.py
@@ -379,11 +379,11 @@
         assert self.struct.unpack("uuu", data) == ('X', 'Y', 'Z')
 
 
-    def test_unpack_buffer(self):
+    def test_unpack_memoryview(self):
         """
-        Buffer objects can be passed to struct.unpack().
+        memoryview objects can be passed to struct.unpack().
         """
-        b = buffer(self.struct.pack("ii", 62, 12))
+        b = memoryview(self.struct.pack("ii", 62, 12))
         assert self.struct.unpack("ii", b) == (62, 12)
         raises(self.struct.error, self.struct.unpack, "i", b)
 


More information about the pypy-commit mailing list