summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-07 23:22:47 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-07 23:22:47 (GMT)
commit4cd63ef67a3e0974f0c48c550769babd401075e3 (patch)
treed96420c663097f5a73a1a29f9fa29dd231563591 /Lib/test/test_capi.py
parent3e17c788a877ad65a48ad357cf3947934e036075 (diff)
downloadcpython-4cd63ef67a3e0974f0c48c550769babd401075e3.zip
cpython-4cd63ef67a3e0974f0c48c550769babd401075e3.tar.gz
cpython-4cd63ef67a3e0974f0c48c550769babd401075e3.tar.bz2
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.
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 96666d1..1a743fd 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -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