summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-09-10 13:38:12 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-09-10 13:38:12 (GMT)
commit24329ba1762688f78ff589d0243683c4afafe096 (patch)
treeb28da2fb6853f6e02df9145012d9c1a8d84c9251 /Lib
parent9ba7a309be6b19d98e6866027ed8b110fd47184d (diff)
downloadcpython-24329ba1762688f78ff589d0243683c4afafe096.zip
cpython-24329ba1762688f78ff589d0243683c4afafe096.tar.gz
cpython-24329ba1762688f78ff589d0243683c4afafe096.tar.bz2
Issue #3811: The Unicode database was updated to 5.1.
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicodedata.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index e47eafd..b24e8f7 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -16,7 +16,7 @@ encoding = 'utf-8'
class UnicodeMethodsTest(unittest.TestCase):
# update this, if the database changes
- expectedchecksum = 'c198ed264497f108434b3f576d4107237221cc8a'
+ expectedchecksum = 'aef99984a58c8e1e5363a3175f2ff9608599a93e'
def test_method_checksum(self):
h = hashlib.sha1()
@@ -75,7 +75,7 @@ class UnicodeDatabaseTest(unittest.TestCase):
class UnicodeFunctionsTest(UnicodeDatabaseTest):
# update this, if the database changes
- expectedchecksum = '4e389f97e9f88b8b7ab743121fd643089116f9f2'
+ expectedchecksum = '3136d5afd787dc2bcb1bdcac95e385349fbebbca'
def test_function_checksum(self):
data = []
@@ -225,6 +225,16 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
def test_bug_1704793(self):
self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), u'\U00010346')
+ def test_ucd_510(self):
+ import unicodedata
+ # In UCD 5.1.0, a mirrored property changed wrt. UCD 3.2.0
+ self.assert_(unicodedata.mirrored(u"\u0f3a"))
+ self.assert_(not unicodedata.ucd_3_2_0.mirrored(u"\u0f3a"))
+ # Also, we now have two ways of representing
+ # the upper-case mapping: as delta, or as absolute value
+ self.assert_(u"a".upper()==u'A')
+ self.assert_(u"\u1d79".upper()==u'\ua77d')
+
def test_main():
test.test_support.run_unittest(
UnicodeMiscTest,