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
|
|
@ -281,12 +281,10 @@ class NamespaceSeparatorTest(unittest.TestCase):
|
|||
expat.ParserCreate(namespace_separator=' ')
|
||||
|
||||
def test_illegal(self):
|
||||
try:
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
r"ParserCreate\(\) argument (2|'namespace_separator') "
|
||||
r"must be str or None, not int"):
|
||||
expat.ParserCreate(namespace_separator=42)
|
||||
self.fail()
|
||||
except TypeError as e:
|
||||
self.assertEqual(str(e),
|
||||
"ParserCreate() argument 'namespace_separator' must be str or None, not int")
|
||||
|
||||
try:
|
||||
expat.ParserCreate(namespace_separator='too long')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue