summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-10-04 14:06:30 (GMT)
committerJesus Cea <jcea@jcea.es>2012-10-04 14:06:30 (GMT)
commit6e1d2b6e7889a138c02c027f8c3dce6ead62e3cf (patch)
tree20f290d7aba6c6037157b89e1e2e73cbe4c7cbe4 /Lib
parente8801e2e44b4ffcfdfc6e2857e7afc90ba6abc38 (diff)
downloadcpython-6e1d2b6e7889a138c02c027f8c3dce6ead62e3cf.zip
cpython-6e1d2b6e7889a138c02c027f8c3dce6ead62e3cf.tar.gz
cpython-6e1d2b6e7889a138c02c027f8c3dce6ead62e3cf.tar.bz2
Closes #16126: PyErr_Format format mismatch in _testcapimodule.c
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_capi.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index d3c4a04..af15a3d 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -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)