Silence some py3k warnings claiming to affect _pyio
This commit is contained in:
parent
8d6c9eeef7
commit
79d923b8c4
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue