[Python-checkins] python/dist/src/Lib/test regrtest.py,1.139,1.140 test_bz2.py,1.14,1.15 test_exceptions.py,1.18,1.19 test_import.py,1.17,1.18 test_normalization.py,1.6,1.7 test_select.py,1.15,1.16 test_shelve.py,1.5,1.6 test_support.py,1.53,1.54 test_tarfile.py,1.8,1.9 test_zipimport.py,1.8,1.9
loewis@users.sourceforge.net
loewis@users.sourceforge.net
Sat, 10 May 2003 00:36:57 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv17284/Lib/test
Modified Files:
regrtest.py test_bz2.py test_exceptions.py test_import.py
test_normalization.py test_select.py test_shelve.py
test_support.py test_tarfile.py test_zipimport.py
Log Message:
Patch #734231: Update RiscOS support. In particular, correct
riscospath.extsep, and use os.extsep throughout.
Index: regrtest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** regrtest.py 6 May 2003 20:36:24 -0000 1.139
--- regrtest.py 10 May 2003 07:36:55 -0000 1.140
***************
*** 727,732 ****
--- 727,734 ----
test_al
test_asynchat
+ test_atexit
test_bsddb
test_bsddb185
+ test_bsddb3
test_cd
test_cl
Index: test_bz2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** test_bz2.py 1 May 2003 17:45:34 -0000 1.14
--- test_bz2.py 10 May 2003 07:36:55 -0000 1.15
***************
*** 12,16 ****
from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor
! has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx")
class BaseTest(unittest.TestCase):
--- 12,16 ----
from bz2 import BZ2File, BZ2Compressor, BZ2Decompressor
! has_cmdline_bunzip2 = sys.platform not in ("win32", "os2emx", "riscos")
class BaseTest(unittest.TestCase):
Index: test_exceptions.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_exceptions.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** test_exceptions.py 30 Jul 2002 23:26:01 -0000 1.18
--- test_exceptions.py 10 May 2003 07:36:55 -0000 1.19
***************
*** 4,8 ****
from types import ClassType
import warnings
! import sys, traceback
print '5. Built-in exceptions'
--- 4,8 ----
from types import ClassType
import warnings
! import sys, traceback, os
print '5. Built-in exceptions'
***************
*** 186,190 ****
co = tb.tb_frame.f_code
assert co.co_name == "test_capi1"
! assert co.co_filename.endswith('test_exceptions.py')
else:
print "Expected exception"
--- 186,190 ----
co = tb.tb_frame.f_code
assert co.co_name == "test_capi1"
! assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
else:
print "Expected exception"
***************
*** 198,202 ****
co = tb.tb_frame.f_code
assert co.co_name == "__init__"
! assert co.co_filename.endswith('test_exceptions.py')
co2 = tb.tb_frame.f_back.f_code
assert co2.co_name == "test_capi2"
--- 198,202 ----
co = tb.tb_frame.f_code
assert co.co_name == "__init__"
! assert co.co_filename.endswith('test_exceptions'+os.extsep+'py')
co2 = tb.tb_frame.f_back.f_code
assert co2.co_name == "test_capi2"
Index: test_import.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_import.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** test_import.py 23 Jul 2002 19:03:55 -0000 1.17
--- test_import.py 10 May 2003 07:36:55 -0000 1.18
***************
*** 79,83 ****
def test_module_with_large_stack(module):
# create module w/list of 65000 elements to test bug #561858
! filename = module + '.py'
# create a file with a list of 65000 elements
--- 79,83 ----
def test_module_with_large_stack(module):
# create module w/list of 65000 elements to test bug #561858
! filename = module + os.extsep + 'py'
# create a file with a list of 65000 elements
***************
*** 103,108 ****
# cleanup
del sys.path[-1]
! for ext in '.pyc', '.pyo':
! fname = module + ext
if os.path.exists(fname):
os.unlink(fname)
--- 103,108 ----
# cleanup
del sys.path[-1]
! for ext in 'pyc', 'pyo':
! fname = module + os.extsep + ext
if os.path.exists(fname):
os.unlink(fname)
Index: test_normalization.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_normalization.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_normalization.py 22 Apr 2003 18:15:05 -0000 1.6
--- test_normalization.py 10 May 2003 07:36:55 -0000 1.7
***************
*** 4,8 ****
from unicodedata import normalize
! TESTDATAFILE = "NormalizationTest.txt"
# This search allows using a build directory just inside the source
--- 4,8 ----
from unicodedata import normalize
! TESTDATAFILE = "NormalizationTest" + os.extsep + "txt"
# This search allows using a build directory just inside the source
Index: test_select.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_select.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** test_select.py 23 Jul 2002 19:04:00 -0000 1.15
--- test_select.py 10 May 2003 07:36:55 -0000 1.16
***************
*** 43,47 ****
def test():
import sys
! if sys.platform[:3] in ('win', 'mac', 'os2'):
if verbose:
print "Can't test select easily on", sys.platform
--- 43,47 ----
def test():
import sys
! if sys.platform[:3] in ('win', 'mac', 'os2', 'riscos'):
if verbose:
print "Can't test select easily on", sys.platform
Index: test_shelve.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shelve.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_shelve.py 1 May 2003 17:45:48 -0000 1.5
--- test_shelve.py 10 May 2003 07:36:55 -0000 1.6
***************
*** 7,11 ****
class TestCase(unittest.TestCase):
! fn = "shelftemp.db"
def test_ascii_file_shelf(self):
--- 7,11 ----
class TestCase(unittest.TestCase):
! fn = "shelftemp" + os.extsep + "db"
def test_ascii_file_shelf(self):
Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -d -r1.53 -r1.54
*** test_support.py 4 May 2003 21:15:27 -0000 1.53
--- test_support.py 10 May 2003 07:36:55 -0000 1.54
***************
*** 57,61 ****
for dirname in sys.path:
try:
! os.unlink(os.path.join(dirname, modname + '.pyc'))
except os.error:
pass
--- 57,61 ----
for dirname in sys.path:
try:
! os.unlink(os.path.join(dirname, modname + os.extsep + 'pyc'))
except os.error:
pass
***************
*** 64,68 ****
# is exited) but there is a .pyo file.
try:
! os.unlink(os.path.join(dirname, modname + '.pyo'))
except os.error:
pass
--- 64,68 ----
# is exited) but there is a .pyo file.
try:
! os.unlink(os.path.join(dirname, modname + os.extsep + 'pyo'))
except os.error:
pass
***************
*** 119,123 ****
# Jython disallows @ in module names
TESTFN = '$test'
! elif os.name != 'riscos':
TESTFN = '@test'
# Unicode name only used if TEST_FN_ENCODING exists for the platform.
--- 119,125 ----
# Jython disallows @ in module names
TESTFN = '$test'
! elif os.name == 'riscos':
! TESTFN = 'testfile'
! else:
TESTFN = '@test'
# Unicode name only used if TEST_FN_ENCODING exists for the platform.
***************
*** 130,135 ****
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
--- 132,135 ----
Index: test_tarfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tarfile.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_tarfile.py 1 May 2003 17:45:51 -0000 1.8
--- test_tarfile.py 10 May 2003 07:36:55 -0000 1.9
***************
*** 22,28 ****
return test_support.findfile(path)
! testtar = path("testtar.tar")
! tempdir = path("testtar.dir")
! tempname = path("testtar.tmp")
membercount = 10
--- 22,28 ----
return test_support.findfile(path)
! testtar = path("testtar" + os.extsep + "tar")
! tempdir = path("testtar" + os.extsep + "dir")
! tempname = path("testtar" + os.extsep + "tmp")
membercount = 10
***************
*** 30,34 ****
if not comp:
return testtar
! return "%s.%s" % (testtar, comp)
def dirname():
--- 30,34 ----
if not comp:
return testtar
! return "%s%s%s" % (testtar, os.extsep, comp)
def dirname():
Index: test_zipimport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_zipimport.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_zipimport.py 1 May 2003 17:45:56 -0000 1.8
--- test_zipimport.py 10 May 2003 07:36:55 -0000 1.9
***************
*** 38,42 ****
TESTPACK = "ziptestpackage"
TESTPACK2 = "ziptestpackage2"
! TEMP_ZIP = os.path.abspath("junk95142.zip")
class UncompressedZipImportTestCase(ImportHooksBaseTestCase):
--- 38,42 ----
TESTPACK = "ziptestpackage"
TESTPACK2 = "ziptestpackage2"
! TEMP_ZIP = os.path.abspath("junk95142" + os.extsep + "zip")
class UncompressedZipImportTestCase(ImportHooksBaseTestCase):