[Python-checkins] cpython (2.7): this obviously is not going to raise any -3 warnings

benjamin.peterson python-checkins at python.org
Wed Mar 20 19:11:18 CET 2013


http://hg.python.org/cpython/rev/15deaa6e33a8
changeset:   82842:15deaa6e33a8
branch:      2.7
user:        Benjamin Peterson <benjamin at python.org>
date:        Wed Mar 20 13:10:41 2013 -0500
summary:
  this obviously is not going to raise any -3 warnings

files:
  Lib/test/test_struct.py |  15 ++++++---------
  1 files changed, 6 insertions(+), 9 deletions(-)


diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -497,15 +497,12 @@
             self.test_unpack_from(cls=buffer)
 
     def test_unpack_with_memoryview(self):
-        with check_py3k_warnings(("buffer.. not supported in 3.x",
-                                  DeprecationWarning)):
-            # SF bug 1563759: struct.unpack doesn't support buffer protocol objects
-            data1 = memoryview('\x12\x34\x56\x78')
-            for data in [data1,]:
-                value, = struct.unpack('>I', data)
-                self.assertEqual(value, 0x12345678)
-
-            self.test_unpack_from(cls=memoryview)
+        # SF bug 1563759: struct.unpack doesn't support buffer protocol objects
+        data1 = memoryview('\x12\x34\x56\x78')
+        for data in [data1,]:
+            value, = struct.unpack('>I', data)
+            self.assertEqual(value, 0x12345678)
+        self.test_unpack_from(cls=memoryview)
 
     def test_bool(self):
         class ExplodingBool(object):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list