summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2001-02-10 14:09:31 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2001-02-10 14:09:31 (GMT)
commitef0a032883cadeb0dba7a6ff84025f7133b75b31 (patch)
tree872b6457088abcd799360f79a3d5ed5b76b18ddf /Lib
parent9ae2148adaa6320e6e1017d9786522f2b57e10f0 (diff)
downloadcpython-ef0a032883cadeb0dba7a6ff84025f7133b75b31.zip
cpython-ef0a032883cadeb0dba7a6ff84025f7133b75b31.tar.gz
cpython-ef0a032883cadeb0dba7a6ff84025f7133b75b31.tar.bz2
Patch by Finn Bock to make test_unicode.py work for Jython.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicode.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 2a24255..d775516 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -261,7 +261,8 @@ test('islower', u'abc\n', 1)
test('isupper', u'a', 0)
test('isupper', u'A', 1)
test('isupper', u'\n', 0)
-test('isupper', u'\u1FFc', 0)
+if sys.platform[:4] != 'java':
+ test('isupper', u'\u1FFc', 0)
test('isupper', u'ABC', 1)
test('isupper', u'AbC', 0)
test('isupper', u'ABC\n', 1)
@@ -339,13 +340,17 @@ verify(u"%c" % (u"a",) == u'a')
verify(u"%c" % ("a",) == u'a')
verify(u"%c" % (34,) == u'"')
verify(u"%c" % (36,) == u'$')
-value = u"%r, %r" % (u"abc", "abc")
-if value != u"u'abc', 'abc'":
- print '*** formatting failed for "%s"' % 'u"%r, %r" % (u"abc", "abc")'
+if sys.platform[:4] != 'java':
+ value = u"%r, %r" % (u"abc", "abc")
+ if value != u"u'abc', 'abc'":
+ print '*** formatting failed for "%s"' % 'u"%r, %r" % (u"abc", "abc")'
verify(u"%(x)s, %(y)s" % {'x':u"abc", 'y':"def"} == u'abc, def')
try:
- value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä'.encode('utf-8'):"def"}
+ if sys.platform[:4] != 'java':
+ value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä'.encode('utf-8'):"def"}
+ else:
+ value = u"%(x)s, %(ä)s" % {'x':u"abc", u'ä':"def"}
except KeyError:
print '*** formatting failed for "%s"' % "u'abc, def'"
else: