diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 18:39:46 (GMT) |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 18:39:46 (GMT) |
| commit | 79d923b8c4cf7136ef16b5506f05f735abd8961d (patch) | |
| tree | 470407e93da296c9dd1485dccf69c5295ece8b10 | |
| parent | 8d6c9eeef7ac244ece76eb349dfc5e72911533d2 (diff) | |
| download | cpython-79d923b8c4cf7136ef16b5506f05f735abd8961d.zip cpython-79d923b8c4cf7136ef16b5506f05f735abd8961d.tar.gz cpython-79d923b8c4cf7136ef16b5506f05f735abd8961d.tar.bz2 | |
Silence some py3k warnings claiming to affect _pyio
| -rw-r--r-- | Lib/test/test_memoryio.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_memoryio.py b/Lib/test/test_memoryio.py index a69caae..d6bff67 100644 --- a/Lib/test/test_memoryio.py +++ b/Lib/test/test_memoryio.py @@ -129,7 +129,9 @@ class MemoryTestMixin: 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 @@ class MemoryTestMixin: 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) |
