Issue #26312: SystemError is now raised in all programming bugs with using

PyArg_ParseTupleAndKeywords().  RuntimeError did raised before in some
programming bugs.
This commit is contained in:
Serhiy Storchaka 2016-02-11 12:41:40 +02:00
parent 78f55ffc63
commit a9725f86a9
3 changed files with 12 additions and 8 deletions

View file

@ -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)