summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_support.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-05-10 07:36:56 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-05-10 07:36:56 (GMT)
commita94568a7535de60f1144e4eea0d027b87017a4b4 (patch)
tree5a8f696ca440a296b18521be17920b48f2021e4c /Lib/test/test_support.py
parent5467d4c0e31e9db305a4899a44d7978f83e96649 (diff)
downloadcpython-a94568a7535de60f1144e4eea0d027b87017a4b4.zip
cpython-a94568a7535de60f1144e4eea0d027b87017a4b4.tar.gz
cpython-a94568a7535de60f1144e4eea0d027b87017a4b4.tar.bz2
Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
Diffstat (limited to 'Lib/test/test_support.py')
-rw-r--r--Lib/test/test_support.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 9c36cf6..57bca38 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -56,14 +56,14 @@ def forget(modname):
import os
for dirname in sys.path:
try:
- os.unlink(os.path.join(dirname, modname + '.pyc'))
+ os.unlink(os.path.join(dirname, modname + os.extsep + 'pyc'))
except os.error:
pass
# Deleting the .pyo file cannot be within the 'try' for the .pyc since
# the chance exists that there is no .pyc (and thus the 'try' statement
# is exited) but there is a .pyo file.
try:
- os.unlink(os.path.join(dirname, modname + '.pyo'))
+ os.unlink(os.path.join(dirname, modname + os.extsep + 'pyo'))
except os.error:
pass
@@ -118,7 +118,9 @@ import os
if os.name == 'java':
# Jython disallows @ in module names
TESTFN = '$test'
-elif os.name != 'riscos':
+elif os.name == 'riscos':
+ TESTFN = 'testfile'
+else:
TESTFN = '@test'
# Unicode name only used if TEST_FN_ENCODING exists for the platform.
if have_unicode:
@@ -129,8 +131,6 @@ elif os.name != 'riscos':
else:
TESTFN_UNICODE=unicode("@test-\xe0\xf2", "latin-1") # 2 latin characters.
TESTFN_ENCODING=sys.getfilesystemencoding()
-else:
- TESTFN = 'test'
# Make sure we can write to TESTFN, try in /tmp if we can't
fp = None