summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-20 18:10:41 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-03-20 18:10:41 (GMT)
commitb2c57a9142ab49af31ecdf254c988a3b3406ca74 (patch)
tree421a1e9944d9bcfc55d59c64136844df56f4562a /Lib/test/test_struct.py
parent625af8e13ea3bdd83fd46cbd6d0bc44d97df9355 (diff)
downloadcpython-b2c57a9142ab49af31ecdf254c988a3b3406ca74.zip
cpython-b2c57a9142ab49af31ecdf254c988a3b3406ca74.tar.gz
cpython-b2c57a9142ab49af31ecdf254c988a3b3406ca74.tar.bz2
this obviously is not going to raise any -3 warnings
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index f1b5d9a..fa056ca 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -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):