mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
78f55ffc63
commit
a9725f86a9
3 changed files with 12 additions and 8 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue