mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Closes #16126: PyErr_Format format mismatch in _testcapimodule.c
This commit is contained in:
parent
e8801e2e44
commit
6e1d2b6e78
3 changed files with 15 additions and 1 deletions
|
|
@ -316,6 +316,17 @@ class SkipitemTest(unittest.TestCase):
|
|||
c, i, when_skipped, when_not_skipped))
|
||||
self.assertIs(when_skipped, when_not_skipped, message)
|
||||
|
||||
def test_parse_tuple_and_keywords(self):
|
||||
# parse_tuple_and_keywords error handling tests
|
||||
self.assertRaises(TypeError, _testcapi.parse_tuple_and_keywords,
|
||||
(), {}, 42, [])
|
||||
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
|
||||
(), {}, b'', 42)
|
||||
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
|
||||
(), {}, b'', [''] * 42)
|
||||
self.assertRaises(ValueError, _testcapi.parse_tuple_and_keywords,
|
||||
(), {}, b'', [42])
|
||||
|
||||
def test_main():
|
||||
support.run_unittest(CAPITest, TestPendingCalls,
|
||||
Test6012, EmbeddingTest, SkipitemTest)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue