mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-108494: Argument Clinic: fix support of Limited C API (GH-108536)
This commit is contained in:
parent
d90973340b
commit
bc5356bb5d
10 changed files with 147 additions and 114 deletions
|
|
@ -2799,11 +2799,13 @@ class TestSpecial(unittest.TestCase):
|
|||
class ThirdFailedStrEnum(CustomStrEnum):
|
||||
one = '1'
|
||||
two = 2 # this will become '2'
|
||||
with self.assertRaisesRegex(TypeError, '.encoding. must be str, not '):
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
r"argument (2|'encoding') must be str, not "):
|
||||
class ThirdFailedStrEnum(CustomStrEnum):
|
||||
one = '1'
|
||||
two = b'2', sys.getdefaultencoding
|
||||
with self.assertRaisesRegex(TypeError, '.errors. must be str, not '):
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
r"argument (3|'errors') must be str, not "):
|
||||
class ThirdFailedStrEnum(CustomStrEnum):
|
||||
one = '1'
|
||||
two = b'2', 'ascii', 9
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue