Merged revisions 66362 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66362 | martin.v.loewis | 2008-09-10 15:38:12 +0200 (Mi, 10 Sep 2008) | 3 lines
Issue #3811: The Unicode database was updated to 5.1.
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
........
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 7ef74df..6edda3a 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -16,7 +16,7 @@
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 UnicodeFunctionsTest(UnicodeDatabaseTest):
# update this, if the database changes
- expectedchecksum = '4e389f97e9f88b8b7ab743121fd643089116f9f2'
+ expectedchecksum = '3136d5afd787dc2bcb1bdcac95e385349fbebbca'
def test_function_checksum(self):
data = []
@@ -226,6 +226,16 @@
def test_bug_1704793(self):
self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), '\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("\u0f3a"))
+ self.assert_(not unicodedata.ucd_3_2_0.mirrored("\u0f3a"))
+ # Also, we now have two ways of representing
+ # the upper-case mapping: as delta, or as absolute value
+ self.assert_("a".upper()=='A')
+ self.assert_("\u1d79".upper()=='\ua77d')
+
def test_main():
test.support.run_unittest(
UnicodeMiscTest,