mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #26198: ValueError is now raised instead of TypeError on buffer
overflow in parsing "es#" and "et#" format units. SystemError is now raised instead of TypeError on programmical error in parsing format string.
This commit is contained in:
parent
3e17c788a8
commit
4cd63ef67a
4 changed files with 20 additions and 8 deletions
|
@ -488,10 +488,10 @@ class SkipitemTest(unittest.TestCase):
|
|||
_testcapi.parse_tuple_and_keywords(tuple_1, dict_b,
|
||||
format.encode("ascii"), keywords)
|
||||
when_not_skipped = False
|
||||
except TypeError as e:
|
||||
except SystemError as e:
|
||||
s = "argument 1 (impossible<bad format char>)"
|
||||
when_not_skipped = (str(e) == s)
|
||||
except RuntimeError as e:
|
||||
except (TypeError, RuntimeError):
|
||||
when_not_skipped = False
|
||||
|
||||
# test the format unit when skipped
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue