mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Tighten the unbuffered readline test to distinguish between the two lines.
This commit is contained in:
parent
3c8dd0c6e7
commit
10e3f411b0
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue