summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 10:41:40 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 10:41:40 (GMT)
commita9725f86a984f74e74f09c4808fc8f4b403728b2 (patch)
tree99da32331ded11bdd6dee41990bee66226acfa2b /Lib/test/test_capi.py
parent78f55ffc63ba637ffa4a07ca869f451e680b002a (diff)
downloadcpython-a9725f86a984f74e74f09c4808fc8f4b403728b2.zip
cpython-a9725f86a984f74e74f09c4808fc8f4b403728b2.tar.gz
cpython-a9725f86a984f74e74f09c4808fc8f4b403728b2.tar.bz2
Issue #26312: SystemError is now raised in all programming bugs with using
PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some programming bugs.
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 1a743fd..74ec6c5 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -491,7 +491,7 @@ class SkipitemTest(unittest.TestCase):
except SystemError as e:
s = "argument 1 (impossible<bad format char>)"
when_not_skipped = (str(e) == s)
- except (TypeError, RuntimeError):
+ except TypeError:
when_not_skipped = False
# test the format unit when skipped
@@ -500,7 +500,7 @@ class SkipitemTest(unittest.TestCase):
_testcapi.parse_tuple_and_keywords(empty_tuple, dict_b,
optional_format.encode("ascii"), keywords)
when_skipped = False
- except RuntimeError as e:
+ except SystemError as e:
s = "impossible<bad format char>: '{}'".format(format)
when_skipped = (str(e) == s)