diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 16:28:52 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-24 16:28:52 +0100 |
commit | 400fcd6f5baebe8be452054e47da4c4389ce13ea (patch) | |
tree | 89baa0ede9e181ddf1af37ca204531ad3cf6bfc2 /Lib/test/test_capi.py | |
parent | 843a33da44b67db324038326aeeb57a62a7a497e (diff) | |
download | cpython-400fcd6f5baebe8be452054e47da4c4389ce13ea.tar.gz |
Issue #23571: Enhance _Py_CheckFunctionResult()
Too bad, sometimes Py_FatalError() is unable to write the exception into
sys.stderr (on "AMD64 OpenIndiana 3.x" buildbot, the buildbot was probably out
of memory).
Call Py_FatalError() with a different message for the two cases (result+error,
or no result and no error).
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index 8a92d6ba29..fbd1466c78 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -185,8 +185,8 @@ class CAPITest(unittest.TestCase): """) rc, out, err = assert_python_failure('-c', code) self.assertRegex(err.replace(b'\r', b''), - br'Fatal Python error: ' - br'Function result is invalid\n' + br'Fatal Python error: a function returned NULL ' + br'without setting an error\n' br'SystemError: <built-in function ' br'return_null_without_error> returned NULL ' br'without setting an error\n' @@ -212,8 +212,8 @@ class CAPITest(unittest.TestCase): """) rc, out, err = assert_python_failure('-c', code) self.assertRegex(err.replace(b'\r', b''), - br'Fatal Python error: ' - br'Function result is invalid\n' + br'Fatal Python error: a function returned a ' + br'result with an error set\n' br'ValueError\n' br'\n' br'During handling of the above exception, ' |