mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)
This commit is contained in:
parent
85527cf50a
commit
a49ac99029
13 changed files with 110 additions and 2 deletions
|
@ -638,6 +638,11 @@ class UnicodeTest(string_tests.CommonTest,
|
|||
self.assertFalse('\U0001F40D'.isalpha())
|
||||
self.assertFalse('\U0001F46F'.isalpha())
|
||||
|
||||
def test_isascii(self):
|
||||
super().test_isascii()
|
||||
self.assertFalse("\u20ac".isascii())
|
||||
self.assertFalse("\U0010ffff".isascii())
|
||||
|
||||
def test_isdecimal(self):
|
||||
self.checkequalnofix(False, '', 'isdecimal')
|
||||
self.checkequalnofix(False, 'a', 'isdecimal')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue