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

astrand at users.sourceforge.net astrand at users.sourceforge.net
Fri Nov 12 16:51:51 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29027

Modified Files:
	test_subprocess.py 
Log Message:
Use os.chdir/os.getcwd instead of os.path.realpath, to support Tru64
TEMP dirs with {memb} strings. Fixes #1063571.


Index: test_subprocess.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_subprocess.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- test_subprocess.py	21 Oct 2004 19:28:34 -0000	1.13
+++ test_subprocess.py	12 Nov 2004 15:51:48 -0000	1.14
@@ -208,7 +208,12 @@
 
     def test_cwd(self):
         tmpdir = os.getenv("TEMP", "/tmp")
-        tmpdir = os.path.realpath(tmpdir)
+        # We cannot use os.path.realpath to canonicalize the path,
+        # since it doesn't expand Tru64 {memb} strings. See bug 1063571.
+        cwd = os.getcwd()
+        os.chdir(tmpdir)
+        tmpdir = os.getcwd()
+        os.chdir(cwd)
         p = subprocess.Popen([sys.executable, "-c",
                           'import sys,os;' \
                           'sys.stdout.write(os.getcwd())'],



More information about the Python-checkins mailing list