Tighten the unbuffered readline test to distinguish between the two lines.

This commit is contained in:
Guido van Rossum 2002-08-07 19:02:49 +00:00
parent 3c8dd0c6e7
commit 10e3f411b0
1 changed files with 4 additions and 4 deletions

View File

@ -574,14 +574,14 @@ class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase):
def testUnbufferedReadline(self):
"""Read a line, create a new file object, read another line with it."""
line = self.serv_file.readline() # first line
self.assertEqual(line, MSG) # first line
self.assertEqual(line, "A. " + MSG) # first line
self.serv_file = self.cli_conn.makefile('rb', 0)
line = self.serv_file.readline() # second line
self.assertEqual(line, MSG) # second line
self.assertEqual(line, "B. " + MSG) # second line
def _testUnbufferedReadline(self):
self.cli_file.write(MSG)
self.cli_file.write(MSG)
self.cli_file.write("A. " + MSG)
self.cli_file.write("B. " + MSG)
self.cli_file.flush()