]> granicus.if.org Git - python/commitdiff
this obviously is not going to raise any -3 warnings
authorBenjamin Peterson <benjamin@python.org>
Wed, 20 Mar 2013 18:10:41 +0000 (13:10 -0500)
committerBenjamin Peterson <benjamin@python.org>
Wed, 20 Mar 2013 18:10:41 +0000 (13:10 -0500)
Lib/test/test_struct.py

index f1b5d9a1cdeffe3e11e2601695b540d3a6ddbda5..fa056ca5f4bf08859c4107c6fbdb56d76fb0aff8 100644 (file)
@@ -497,15 +497,12 @@ class StructTest(unittest.TestCase):
             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):