[Python-checkins] CVS: python/dist/src/Lib/test test_pty.py,1.13,1.14

Guido van Rossum gvanrossum@users.sourceforge.net
Tue, 11 Sep 2001 07:24:38 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv26981

Modified Files:
	test_pty.py 
Log Message:
Fix the second reincarnation of SF #456395 -- failure on IRIX.  This
time use .replace() to change all \r\n into \n, not just the last one.


Index: test_pty.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pty.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_pty.py	2001/09/04 19:14:14	1.13
--- test_pty.py	2001/09/11 14:24:35	1.14
***************
*** 35,41 ****
  os.write(slave_fd, TEST_STRING_1)
  s1 = os.read(master_fd, 1024)
! if s1[-2:] == "\r\n":
!     s1 = s1[:-2] + "\n"
! sys.stdout.write(s1)
  
  debug("Writing chunked output")
--- 35,39 ----
  os.write(slave_fd, TEST_STRING_1)
  s1 = os.read(master_fd, 1024)
! sys.stdout.write(s1.replace("\r\n", "\n"))
  
  debug("Writing chunked output")
***************
*** 43,49 ****
  os.write(slave_fd, TEST_STRING_2[5:])
  s2 = os.read(master_fd, 1024)
! if s2[-2:] == "\r\n":
!     s2 = s2[:-2] + "\n"
! sys.stdout.write(s2)
  
  os.close(slave_fd)
--- 41,45 ----
  os.write(slave_fd, TEST_STRING_2[5:])
  s2 = os.read(master_fd, 1024)
! sys.stdout.write(s2.replace("\r\n", "\n"))
  
  os.close(slave_fd)