Skip to content

Commit

Permalink
Port test_name_inverse_lookup from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoopJ committed Sep 21, 2023
1 parent e20be7d commit 461c283
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_unicodedata2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def test_function_checksum(self):
result = h.hexdigest()
self.assertEqual(result, self.expectedchecksum)

def test_name_inverse_lookup(self):
for i in range(sys.maxunicode + 1):
char = chr(i)
looked_name = self.db.name(char, None)
if looked_name:
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)
Expand Down

0 comments on commit 461c283

Please sign in to comment.