[Python-checkins] python/dist/src/Lib/test test_tempfile.py, 1.15, 1.16

loewis at users.sourceforge.net loewis at users.sourceforge.net
Thu Oct 23 11:55:30 EDT 2003


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

Modified Files:
	test_tempfile.py 
Log Message:
Patch #813200: Quote executable path on Windows. Fixes #811082.
Backported to 2.3.


Index: test_tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tempfile.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_tempfile.py	12 Oct 2003 17:37:01 -0000	1.15
--- test_tempfile.py	23 Oct 2003 15:55:28 -0000	1.16
***************
*** 294,299 ****
                                "tf_inherit_check.py")
  
!         retval = os.spawnl(os.P_WAIT, sys.executable,
!                            sys.executable, tester, v, fd)
          self.failIf(retval < 0,
                      "child process caught fatal signal %d" % -retval)
--- 294,307 ----
                                "tf_inherit_check.py")
  
!         # On Windows a spawn* /path/ with embedded spaces shouldn't be quoted,
!         # but an arg with embedded spaces should be decorated with double
!         # quotes on each end
!         if sys.platform in ('win32'):
!             decorated = '"%s"' % sys.executable
!             tester = '"%s"' % tester
!         else:
!             decorated = sys.executable
! 
!         retval = os.spawnl(os.P_WAIT, sys.executable, decorated, tester, v, fd)
          self.failIf(retval < 0,
                      "child process caught fatal signal %d" % -retval)





More information about the Python-checkins mailing list