bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)

This commit is contained in:
INADA Naoki 2018-01-27 14:06:21 +09:00 committed by GitHub
parent 85527cf50a
commit a49ac99029
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 110 additions and 2 deletions

View file

@ -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')