summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPeter Astrand <astrand@lysator.liu.se>2004-11-12 15:51:48 (GMT)
committerPeter Astrand <astrand@lysator.liu.se>2004-11-12 15:51:48 (GMT)
commit195404ff900cc7bb72517c4dbdda5b203b4c8b3c (patch)
treee9e1c7e884ff1c2cc8cb11d1c75b3cebf46e2d56 /Lib
parent2dae7646c30fcb347c093632a4df18292e246a1a (diff)
downloadcpython-195404ff900cc7bb72517c4dbdda5b203b4c8b3c.zip
cpython-195404ff900cc7bb72517c4dbdda5b203b4c8b3c.tar.gz
cpython-195404ff900cc7bb72517c4dbdda5b203b4c8b3c.tar.bz2
Use os.chdir/os.getcwd instead of os.path.realpath, to support Tru64
TEMP dirs with {memb} strings. Fixes #1063571.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_subprocess.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index a5d9d9c..b0d8235 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -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())'],