Tighten the unbuffered readline test to distinguish between the two lines.
This commit is contained in:
parent
3c8dd0c6e7
commit
10e3f411b0
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue