[Python-checkins] r75415 - python/trunk/Lib/test/test_memoryio.py

antoine.pitrou python-checkins at python.org
Wed Oct 14 20:39:47 CEST 2009


Author: antoine.pitrou
Date: Wed Oct 14 20:39:46 2009
New Revision: 75415

Log:
Silence some py3k warnings claiming to affect _pyio



Modified:
   python/trunk/Lib/test/test_memoryio.py

Modified: python/trunk/Lib/test/test_memoryio.py
==============================================================================
--- python/trunk/Lib/test/test_memoryio.py	(original)
+++ python/trunk/Lib/test/test_memoryio.py	Wed Oct 14 20:39:46 2009
@@ -129,7 +129,9 @@
         pos = memio.tell()
         self.assertEqual(memio.truncate(None), pos)
         self.assertEqual(memio.tell(), pos)
-        self.assertRaises(TypeError, memio.truncate, '0')
+        # Silence a py3k warning
+        with support.check_warnings():
+            self.assertRaises(TypeError, memio.truncate, '0')
         memio.close()
         self.assertRaises(ValueError, memio.truncate, 0)
 
@@ -165,7 +167,9 @@
         self.assertEqual(type(memio.read()), type(buf))
         memio.seek(0)
         self.assertEqual(memio.read(None), buf)
-        self.assertRaises(TypeError, memio.read, '')
+        # Silence a py3k warning
+        with support.check_warnings():
+            self.assertRaises(TypeError, memio.read, '')
         memio.close()
         self.assertRaises(ValueError, memio.read)
 


More information about the Python-checkins mailing list