]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use os.chdir/os.getcwd instead of os.path.realpath, to support Tru64
authorPeter Astrand <astrand@lysator.liu.se>
Fri, 12 Nov 2004 15:51:48 +0000 (15:51 +0000)
committerPeter Astrand <astrand@lysator.liu.se>
Fri, 12 Nov 2004 15:51:48 +0000 (15:51 +0000)
TEMP dirs with {memb} strings. Fixes #1063571.

Lib/test/test_subprocess.py

index a5d9d9c59f332c5a8152aed5238a1d82093ab8d4..b0d82356bca5372640ab755f30f00d0a12de4e35 100644 (file)
@@ -208,7 +208,12 @@ class ProcessTestCase(unittest.TestCase):
 
     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())'],