summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-24 20:18:37 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-24 20:18:37 (GMT)
commit52ddaefb6bab1a74ecffe8519c02735794ebfbe1 (patch)
tree13502509d48f9dfcfceb8020a41d099aa32ec800
parent39013cd4c0f76b7b6c34efe4e341618f0ad2027a (diff)
downloadcpython-52ddaefb6bab1a74ecffe8519c02735794ebfbe1.zip
cpython-52ddaefb6bab1a74ecffe8519c02735794ebfbe1.tar.gz
cpython-52ddaefb6bab1a74ecffe8519c02735794ebfbe1.tar.bz2
Make test_locale pass by removing tests that were designed to handle
issues with <ctype.h> on various platforms. We no longer use <ctype.h>.
-rw-r--r--Lib/test/test_locale.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 5fcba6f..ef1f5c2 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -78,42 +78,3 @@ try:
finally:
locale.setlocale(locale.LC_NUMERIC, oldlocale)
-
-
-# Test BSD Rune locale's bug for isctype functions.
-def teststrop(s, method, output):
- s = str8(s, 'latin1') # XXX
- if verbose:
- print("%s.%s() =? %s ..." % (repr(s), method, repr(output)), end=' ')
- result = getattr(s, method)()
- if result != output:
- if verbose:
- print("no")
- print("%s.%s() == %s != %s" % (repr(s), method, repr(result),
- repr(output)))
- elif verbose:
- print("yes")
-
-try:
- if sys.platform == 'sunos5':
- # On Solaris, in en_US.UTF-8, \xa0 is a space
- raise locale.Error
- oldlocale = locale.setlocale(locale.LC_CTYPE)
- locale.setlocale(locale.LC_CTYPE, 'en_US.UTF-8')
-except locale.Error:
- pass
-else:
- try:
- teststrop('\x20', 'isspace', True)
- teststrop('\xa0', 'isspace', False)
- teststrop('\xa1', 'isspace', False)
- teststrop('\xc0', 'isalpha', False)
- teststrop('\xc0', 'isalnum', False)
- teststrop('\xc0', 'isupper', False)
- teststrop('\xc0', 'islower', False)
- teststrop('\xec\xa0\xbc', 'split', ['\xec\xa0\xbc'])
- teststrop('\xed\x95\xa0', 'strip', '\xed\x95\xa0')
- teststrop('\xcc\x85', 'lower', '\xcc\x85')
- teststrop('\xed\x95\xa0', 'upper', '\xed\x95\xa0')
- finally:
- locale.setlocale(locale.LC_CTYPE, oldlocale)