mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Use os.chdir/os.getcwd instead of os.path.realpath, to support Tru64
TEMP dirs with {memb} strings. Fixes #1063571.
			
			
This commit is contained in:
		
							parent
							
								
									2dae7646c3
								
							
						
					
					
						commit
						195404ff90
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -208,7 +208,12 @@ def test_stdout_stderr_file(self):
 | 
			
		|||
 | 
			
		||||
    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())'],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue