MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_digit

Method test_digit

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

Source from the content-addressed store, hash-verified

133 self.assertRaises(KeyError, self.db.lookup, nonexistent)
134
135 def test_digit(self):
136 self.assertEqual(self.db.digit('A', None), None)
137 self.assertEqual(self.db.digit('9'), 9)
138 self.assertEqual(self.db.digit('\u215b', None), None)
139 self.assertEqual(self.db.digit('\u2468'), 9)
140 self.assertEqual(self.db.digit('\U00020000', None), None)
141 self.assertEqual(self.db.digit('\U0001D7FD'), 7)
142
143 self.assertRaises(TypeError, self.db.digit)
144 self.assertRaises(TypeError, self.db.digit, 'xx')
145 self.assertRaises(ValueError, self.db.digit, 'x')
146
147 def test_numeric(self):
148 self.assertEqual(self.db.numeric('A',None), None)

Callers

nothing calls this directly

Calls 3

digitMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected