summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_unicodedata.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py
index 3514697..85a3c2d 100644
--- a/Lib/test/test_unicodedata.py
+++ b/Lib/test/test_unicodedata.py
@@ -95,6 +95,13 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
result = h.hexdigest()
self.assertEqual(result, self.expectedchecksum)
+ @requires_resource('cpu')
+ def test_name_inverse_lookup(self):
+ for i in range(sys.maxunicode + 1):
+ char = chr(i)
+ if looked_name := self.db.name(char, None):
+ self.assertEqual(self.db.lookup(looked_name), char)
+
def test_digit(self):
self.assertEqual(self.db.digit('A', None), None)
self.assertEqual(self.db.digit('9'), 9)