summaryrefslogtreecommitdiffstats
path: root/Lib/test
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
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')
-rwxr-xr-xLib/test/regrtest.py2
-rw-r--r--Lib/test/test_bz2.py2
-rw-r--r--Lib/test/test_exceptions.py6
-rw-r--r--Lib/test/test_import.py6
-rw-r--r--Lib/test/test_normalization.py2
-rw-r--r--Lib/test/test_select.py2
-rw-r--r--Lib/test/test_shelve.py2
-rw-r--r--Lib/test/test_support.py10
-rw-r--r--Lib/test/test_tarfile.py8
-rw-r--r--Lib/test/test_zipimport.py2
10 files changed, 22 insertions, 20 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 3220b20..24b0aea 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -726,8 +726,10 @@ _expectations = {
"""
test_al
test_asynchat
+ test_atexit
test_bsddb
test_bsddb185
+ test_bsddb3
test_cd
test_cl
test_commands
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index 5280ba8..61f8047 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -11,7 +11,7 @@ import sys
import bz2
from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor
-has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx")
+has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx", "riscos")
class BaseTest(unittest.TestCase):
"Base for other testcases."
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 24ae9e3..83e680f 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -3,7 +3,7 @@
from test.test_support import TestFailed, TESTFN, unlink
from types import ClassType
import warnings
-import sys, traceback
+import sys, traceback, os
print '5. Built-in exceptions'
# XXX This is not really enough, each *operation* should be tested!
@@ -185,7 +185,7 @@ def test_capi1():
exc, err, tb = sys.exc_info()
co = tb.tb_frame.f_code
assert co.co_name == "test_capi1"
- assert co.co_filename.endswith('test_exceptions.py')
+ assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
else:
print "Expected exception"
@@ -197,7 +197,7 @@ def test_capi2():
exc, err, tb = sys.exc_info()
co = tb.tb_frame.f_code
assert co.co_name == "__init__"
- assert co.co_filename.endswith('test_exceptions.py')
+ assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
co2 = tb.tb_frame.f_back.f_code
assert co2.co_name == "test_capi2"
else:
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index f946445..cc424af 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -78,7 +78,7 @@ os = imp.load_module("os", *x)
def test_module_with_large_stack(module):
# create module w/list of 65000 elements to test bug #561858
- filename = module + '.py'
+ filename = module + os.extsep + 'py'
# create a file with a list of 65000 elements
f = open(filename, 'w+')
@@ -102,8 +102,8 @@ def test_module_with_large_stack(module):
# cleanup
del sys.path[-1]
- for ext in '.pyc', '.pyo':
- fname = module + ext
+ for ext in 'pyc', 'pyo':
+ fname = module + os.extsep + ext
if os.path.exists(fname):
os.unlink(fname)
diff --git a/Lib/test/test_normalization.py b/Lib/test/test_normalization.py
index 94d07d5..f8d2786 100644
--- a/Lib/test/test_normalization.py
+++ b/Lib/test/test_normalization.py
@@ -3,7 +3,7 @@ import sys
import os
from unicodedata import normalize
-TESTDATAFILE = "NormalizationTest.txt"
+TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
# This search allows using a build directory just inside the source
# directory, and saving just one copy of the test data in the source
diff --git a/Lib/test/test_select.py b/Lib/test/test_select.py
index 1bc2ba9..6a00fe4 100644
--- a/Lib/test/test_select.py
+++ b/Lib/test/test_select.py
@@ -42,7 +42,7 @@ else:
def test():
import sys
- if sys.platform[:3] in ('win', 'mac', 'os2'):
+ if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
if verbose:
print "Can't test select easily on", sys.platform
return
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py
index 8ef511e..f852be5 100644
--- a/Lib/test/test_shelve.py
+++ b/Lib/test/test_shelve.py
@@ -6,7 +6,7 @@ from test import test_support
class TestCase(unittest.TestCase):
- fn = "shelftemp.db"
+ fn = "shelftemp" + os.extsep + "db"
def test_ascii_file_shelf(self):
try:
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
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 496dede..e259712 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -21,15 +21,15 @@ except ImportError:
def path(path):
return test_support.findfile(path)
-testtar = path("testtar.tar")
-tempdir = path("testtar.dir")
-tempname = path("testtar.tmp")
+testtar = path("testtar" + os.extsep + "tar")
+tempdir = path("testtar" + os.extsep + "dir")
+tempname = path("testtar" + os.extsep + "tmp")
membercount = 10
def tarname(comp=""):
if not comp:
return testtar
- return "%s.%s" % (testtar, comp)
+ return "%s%s%s" % (testtar, os.extsep, comp)
def dirname():
if not os.path.exists(tempdir):
diff --git a/Lib/test/test_zipimport.py b/Lib/test/test_zipimport.py
index 04682db..26a2f1f 100644
--- a/Lib/test/test_zipimport.py
+++ b/Lib/test/test_zipimport.py
@@ -37,7 +37,7 @@ else:
TESTMOD = "ziptestmodule"
TESTPACK = "ziptestpackage"
TESTPACK2 = "ziptestpackage2"
-TEMP_ZIP = os.path.abspath("junk95142.zip")
+TEMP_ZIP = os.path.abspath("junk95142" + os.extsep + "zip")
class UncompressedZipImportTestCase(ImportHooksBaseTestCase):