mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line #9424: Replace deprecated assert* methods in the Python test suite. ........
This commit is contained in:
parent
b65b4937e2
commit
19f2aeba67
164 changed files with 2281 additions and 2279 deletions
|
@ -20,17 +20,17 @@ class MemorySeekTestMixin:
|
|||
buf = self.buftype("1234567890")
|
||||
bytesIo = self.ioclass(buf)
|
||||
|
||||
self.assertEquals(buf[:1], bytesIo.read(1))
|
||||
self.assertEquals(buf[1:5], bytesIo.read(4))
|
||||
self.assertEquals(buf[5:], bytesIo.read(900))
|
||||
self.assertEquals(self.EOF, bytesIo.read())
|
||||
self.assertEqual(buf[:1], bytesIo.read(1))
|
||||
self.assertEqual(buf[1:5], bytesIo.read(4))
|
||||
self.assertEqual(buf[5:], bytesIo.read(900))
|
||||
self.assertEqual(self.EOF, bytesIo.read())
|
||||
|
||||
def testReadNoArgs(self):
|
||||
buf = self.buftype("1234567890")
|
||||
bytesIo = self.ioclass(buf)
|
||||
|
||||
self.assertEquals(buf, bytesIo.read())
|
||||
self.assertEquals(self.EOF, bytesIo.read())
|
||||
self.assertEqual(buf, bytesIo.read())
|
||||
self.assertEqual(self.EOF, bytesIo.read())
|
||||
|
||||
def testSeek(self):
|
||||
buf = self.buftype("1234567890")
|
||||
|
@ -38,21 +38,21 @@ class MemorySeekTestMixin:
|
|||
|
||||
bytesIo.read(5)
|
||||
bytesIo.seek(0)
|
||||
self.assertEquals(buf, bytesIo.read())
|
||||
self.assertEqual(buf, bytesIo.read())
|
||||
|
||||
bytesIo.seek(3)
|
||||
self.assertEquals(buf[3:], bytesIo.read())
|
||||
self.assertEqual(buf[3:], bytesIo.read())
|
||||
self.assertRaises(TypeError, bytesIo.seek, 0.0)
|
||||
|
||||
def testTell(self):
|
||||
buf = self.buftype("1234567890")
|
||||
bytesIo = self.ioclass(buf)
|
||||
|
||||
self.assertEquals(0, bytesIo.tell())
|
||||
self.assertEqual(0, bytesIo.tell())
|
||||
bytesIo.seek(5)
|
||||
self.assertEquals(5, bytesIo.tell())
|
||||
self.assertEqual(5, bytesIo.tell())
|
||||
bytesIo.seek(10000)
|
||||
self.assertEquals(10000, bytesIo.tell())
|
||||
self.assertEqual(10000, bytesIo.tell())
|
||||
|
||||
|
||||
class MemoryTestMixin:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue