[Python-checkins] python/dist/src/Lib/test test_netrc.py, 1.5, 1.5.14.1

jlt63 at users.sourceforge.net jlt63 at users.sourceforge.net
Mon Aug 11 06:13:47 EDT 2003


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

Modified Files:
      Tag: release23-maint
	test_netrc.py 
Log Message:
Unconditionally opening the temp file in text mode causes this test to fail
under Cygwin. The attached patch corrects this problem.

I tested this patch under Red Hat Linux 8.0 too.


Index: test_netrc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_netrc.py,v
retrieving revision 1.5
retrieving revision 1.5.14.1
diff -C2 -d -r1.5 -r1.5.14.1
*** test_netrc.py	17 Feb 2003 14:51:41 -0000	1.5
--- test_netrc.py	11 Aug 2003 12:13:45 -0000	1.5.14.1
***************
*** 1,4 ****
  
! import netrc, os, unittest
  from test import test_support
  
--- 1,4 ----
  
! import netrc, os, unittest, sys
  from test import test_support
  
***************
*** 23,27 ****
  
      def setUp (self):
!         fp = open(temp_filename, 'wt')
          fp.write(TEST_NETRC)
          fp.close()
--- 23,30 ----
  
      def setUp (self):
!         mode = 'w'
!         if sys.platform not in ['cygwin']:
!             mode += 't'
!         fp = open(temp_filename, mode)
          fp.write(TEST_NETRC)
          fp.close()





More information about the Python-checkins mailing list