summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2009-04-25 14:05:52 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2009-04-25 14:05:52 (GMT)
commit6c863d1ab2c86d6c67ea9162e75fca4a6f5f901a (patch)
tree3eae051be1547d7653072953333d6b5ed104dcff /Lib/test
parent22999a69e1e810757823abef87b744ad3686f908 (diff)
downloadcpython-6c863d1ab2c86d6c67ea9162e75fca4a6f5f901a.zip
cpython-6c863d1ab2c86d6c67ea9162e75fca4a6f5f901a.tar.gz
cpython-6c863d1ab2c86d6c67ea9162e75fca4a6f5f901a.tar.bz2
Merged revisions 71894 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r71894 | walter.doerwald | 2009-04-25 16:03:16 +0200 (Sa, 25 Apr 2009) | 4 lines Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in makeunicodedata.py and regenerated the Unicode database (This fixes u'\u1d79'.lower() == '\x00'). ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_unicodedata.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 84999e5..18f37f8 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -20,7 +20,7 @@ encoding = 'utf-8'
class UnicodeMethodsTest(unittest.TestCase):
# update this, if the database changes
- expectedchecksum = 'aef99984a58c8e1e5363a3175f2ff9608599a93e'
+ expectedchecksum = 'b7db9b5f1d804976fa921d2009cbef6f025620c1'
def test_method_checksum(self):
h = hashlib.sha1()
@@ -257,6 +257,19 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
# the upper-case mapping: as delta, or as absolute value
self.assert_(u"a".upper()==u'A')
self.assert_(u"\u1d79".upper()==u'\ua77d')
+ self.assert_(u".".upper()==u".")
+
+ def test_bug_5828(self):
+ self.assertEqual(u"\u1d79".lower(), u"\u1d79")
+ # Only U+0000 should have U+0000 as its upper/lower/titlecase variant
+ self.assertEqual(
+ [
+ c for c in range(sys.maxunicode+1)
+ if u"\x00" in unichr(c).lower()+unichr(c).upper()+unichr(c).title()
+ ],
+ [0]
+ )
+
def test_main():
test.test_support.run_unittest(