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

Method test_isdigit

Lib/test/test_str.py:802–812  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

800 self.assertTrue(ch.isdecimal(), '{!a} is decimal.'.format(ch))
801
802 def test_isdigit(self):
803 super().test_isdigit()
804 self.checkequalnofix(True, '\u2460', 'isdigit')
805 self.checkequalnofix(False, '\xbc', 'isdigit')
806 self.checkequalnofix(True, '\u0660', 'isdigit')
807
808 for ch in ['\U00010401', '\U00010427', '\U00010429', '\U0001044E',
809 '\U0001F40D', '\U0001F46F', '\U00011065']:
810 self.assertFalse(ch.isdigit(), '{!a} is not a digit.'.format(ch))
811 for ch in ['\U0001D7F6', '\U00011066', '\U000104A0', '\U0001F107']:
812 self.assertTrue(ch.isdigit(), '{!a} is a digit.'.format(ch))
813
814 def test_isnumeric(self):
815 self.checkequalnofix(False, '', 'isnumeric')

Callers

nothing calls this directly

Calls 6

checkequalnofixMethod · 0.95
superClass · 0.85
assertFalseMethod · 0.80
isdigitMethod · 0.80
assertTrueMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected