summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-09-29 00:14:56 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-09-29 00:14:56 (GMT)
commitf503673c4dfc38d652eabeed44c21484fc697c4f (patch)
tree048cd3aa794da01895fcc9a4ec3044706f192008 /Lib
parentdfb866d127c852dfd2d36dfb766d90a518aaf516 (diff)
downloadcpython-f503673c4dfc38d652eabeed44c21484fc697c4f.zip
cpython-f503673c4dfc38d652eabeed44c21484fc697c4f.tar.gz
cpython-f503673c4dfc38d652eabeed44c21484fc697c4f.tar.bz2
Move UCS4-specific tests with the "normal" tests.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicodedata.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 9744256..7715376 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -108,6 +108,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
self.assertEqual(self.db.digit('\u215b', None), None)
self.assertEqual(self.db.digit('\u2468'), 9)
self.assertEqual(self.db.digit('\U00020000', None), None)
+ self.assertEqual(self.db.digit('\U0001D7FD'), 7)
self.assertRaises(TypeError, self.db.digit)
self.assertRaises(TypeError, self.db.digit, 'xx')
@@ -120,6 +121,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
self.assertEqual(self.db.numeric('\u2468'), 9.0)
self.assertEqual(self.db.numeric('\ua627'), 7.0)
self.assertEqual(self.db.numeric('\U00020000', None), None)
+ self.assertEqual(self.db.numeric('\U0001012A'), 9000)
self.assertRaises(TypeError, self.db.numeric)
self.assertRaises(TypeError, self.db.numeric, 'xx')
@@ -131,6 +133,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
self.assertEqual(self.db.decimal('\u215b', None), None)
self.assertEqual(self.db.decimal('\u2468', None), None)
self.assertEqual(self.db.decimal('\U00020000', None), None)
+ self.assertEqual(self.db.decimal('\U0001D7FD'), 7)
self.assertRaises(TypeError, self.db.decimal)
self.assertRaises(TypeError, self.db.decimal, 'xx')
@@ -141,6 +144,7 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
self.assertEqual(self.db.category('a'), 'Ll')
self.assertEqual(self.db.category('A'), 'Lu')
self.assertEqual(self.db.category('\U00020000'), 'Lo')
+ self.assertEqual(self.db.category('\U0001012A'), 'No')
self.assertRaises(TypeError, self.db.category)
self.assertRaises(TypeError, self.db.category, 'xx')
@@ -308,14 +312,6 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
self.assertEqual(len(lines), 1,
r"\u%.4x should not be a linebreak" % i)
- def test_UCS4(self):
- # unicodedata should work with code points outside the BMP
- # even on a narrow Unicode build
- self.assertEqual(self.db.category("\U0001012A"), "No")
- self.assertEqual(self.db.numeric("\U0001012A"), 9000)
- self.assertEqual(self.db.decimal("\U0001D7FD"), 7)
- self.assertEqual(self.db.digit("\U0001D7FD"), 7)
-
def test_main():
test.support.run_unittest(
UnicodeMiscTest,