mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	In Jython, `@' is not allowed in module names. Extend the TESTFN test
to use "$test" when in Jython. Closes SF patch #403668.
This commit is contained in:
		
							parent
							
								
									66e8e86cf8
								
							
						
					
					
						commit
						559f6680c2
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -57,10 +57,14 @@ def fcmp(x, y): # fuzzy comparison function
 | 
			
		|||
    return cmp(x, y)
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
if os.name !='riscos':
 | 
			
		||||
    TESTFN = '@test' # Filename used for testing
 | 
			
		||||
# Filename used for testing
 | 
			
		||||
if os.name == 'java':
 | 
			
		||||
    # Jython disallows @ in module names
 | 
			
		||||
    TESTFN = '$test'
 | 
			
		||||
elif os.name != 'riscos':
 | 
			
		||||
    TESTFN = '@test'
 | 
			
		||||
else:
 | 
			
		||||
    TESTFN = 'test' # Filename used for testing
 | 
			
		||||
    TESTFN = 'test'
 | 
			
		||||
del os
 | 
			
		||||
 | 
			
		||||
from os import unlink
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue