[Python-checkins] python/dist/src/Lib/test test_socket.py,1.51,1.52
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
2002年8月07日 12:02:51 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv10176
Modified Files:
test_socket.py
Log Message:
Tighten the unbuffered readline test to distinguish between the two lines.
Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** test_socket.py 7 Aug 2002 16:03:06 -0000 1.51
--- test_socket.py 7 Aug 2002 19:02:49 -0000 1.52
***************
*** 575,586 ****
"""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.serv_file = self.cli_conn.makefile('rb', 0)
line = self.serv_file.readline() # second line
! self.assertEqual(line, MSG) # second line
def _testUnbufferedReadline(self):
! self.cli_file.write(MSG)
! self.cli_file.write(MSG)
self.cli_file.flush()
--- 575,586 ----
"""Read a line, create a new file object, read another line with it."""
line = self.serv_file.readline() # 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, "B. " + MSG) # second line
def _testUnbufferedReadline(self):
! self.cli_file.write("A. " + MSG)
! self.cli_file.write("B. " + MSG)
self.cli_file.flush()