mirror of https://github.com/python/cpython
Silence some py3k warnings claiming to affect _pyio
This commit is contained in:
parent
8d6c9eeef7
commit
79d923b8c4
|
@ -129,6 +129,8 @@ class MemoryTestMixin:
|
|||
pos = memio.tell()
|
||||
self.assertEqual(memio.truncate(None), pos)
|
||||
self.assertEqual(memio.tell(), pos)
|
||||
# Silence a py3k warning
|
||||
with support.check_warnings():
|
||||
self.assertRaises(TypeError, memio.truncate, '0')
|
||||
memio.close()
|
||||
self.assertRaises(ValueError, memio.truncate, 0)
|
||||
|
@ -165,6 +167,8 @@ class MemoryTestMixin:
|
|||
self.assertEqual(type(memio.read()), type(buf))
|
||||
memio.seek(0)
|
||||
self.assertEqual(memio.read(None), buf)
|
||||
# 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