summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_exceptions.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-06 23:54:20 (GMT)
committerGitHub <noreply@github.com>2020-03-06 23:54:20 (GMT)
commit9e5d30cc99e34f4c3e7b2cd851de20816c9d1927 (patch)
tree71e726c4695b9b3b0a31d7d2516ce8ee83b52721 /Lib/test/test_exceptions.py
parent7b3c252dc7f44d4bdc4c7c82d225ebd09c78f520 (diff)
downloadcpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.zip
cpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.tar.gz
cpython-9e5d30cc99e34f4c3e7b2cd851de20816c9d1927.tar.bz2
bpo-39882: Py_FatalError() logs the function name (GH-18819)
The Py_FatalError() function is replaced with a macro which logs automatically the name of the current function, unless the Py_LIMITED_API macro is defined. Changes: * Add _Py_FatalErrorFunc() function. * Remove the function name from the message of Py_FatalError() calls which included the function name. * Update tests.
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r--Lib/test/test_exceptions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py
index 22a2236..2d3a13a 100644
--- a/Lib/test/test_exceptions.py
+++ b/Lib/test/test_exceptions.py
@@ -1078,8 +1078,9 @@ class ExceptionTests(unittest.TestCase):
"""
with SuppressCrashReport():
rc, out, err = script_helper.assert_python_failure("-c", code)
- self.assertIn(b'Fatal Python error: Cannot recover from '
- b'MemoryErrors while normalizing exceptions.', err)
+ self.assertIn(b'Fatal Python error: _PyErr_NormalizeException: '
+ b'Cannot recover from MemoryErrors while '
+ b'normalizing exceptions.', err)
@cpython_only
def test_MemoryError(self):