]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
In Jython, `@' is not allowed in module names. Extend the TESTFN test
authorBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 18:04:02 +0000 (18:04 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 23 Mar 2001 18:04:02 +0000 (18:04 +0000)
to use "$test" when in Jython.  Closes SF patch #403668.

Lib/test/test_support.py

index aa8eaa62fdda0d719603244be94c7b9d5922efa1..943ba8aedd6b054bbb4a09812c5c16efdd4e81f4 100644 (file)
@@ -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