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

Method test_digit_numeric_consistent

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

Source from the content-addressed store, hash-verified

1119 self.assertTrue(count >= 10, count) # should have tested at least the ASCII digits
1120
1121 def test_digit_numeric_consistent(self):
1122 # Test that digit and numeric are consistent,
1123 # i.e. if a character has a digit value,
1124 # its numeric value should be the same.
1125 count = 0
1126 for c in iterallchars():
1127 dec = self.db.digit(c, -1)
1128 if dec != -1:
1129 self.assertEqual(dec, self.db.numeric(c))
1130 count += 1
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())

Callers

nothing calls this directly

Calls 3

iterallcharsFunction · 0.85
assertTrueMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected