Kaydet (Commit) 79d923b8 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Silence some py3k warnings claiming to affect _pyio

üst 8d6c9eee
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment