MCPcopy Index your code
hub / github.com/python/cpython / test_normalize_consistent

Method test_normalize_consistent

Lib/test/test_unicodedata.py:1133–1141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1131 self.assertTrue(count >= 10, count) # should have tested at least the ASCII digits
1132
1133 def test_normalize_consistent(self):
1134 allchars = list(iterallchars())
1135 for form in ('NFC', 'NFD', 'NFKC', 'NFKD'):
1136 for c in allchars:
1137 norm = self.db.normalize(form, c)
1138 self.assertEqual(self.db.is_normalized(form, c), norm == c)
1139 if norm != c:
1140 self.assertEqual(self.db.normalize(form, norm), norm)
1141 self.assertTrue(self.db.is_normalized(form, norm))
1142
1143 def test_bug_1704793(self):
1144 self.assertEqual(self.db.lookup("GOTHIC LETTER FAIHU"), '\U00010346')

Callers

nothing calls this directly

Calls 5

listClass · 0.85
iterallcharsFunction · 0.85
assertTrueMethod · 0.80
normalizeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected