bpo-38070: Py_FatalError() logs runtime state (GH-16246)

This commit is contained in:
Victor Stinner 2019-09-18 01:35:33 +02:00 committed by GitHub
parent d3b904144e
commit 1ce16fb097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 32 deletions

View file

@ -198,6 +198,7 @@ class CAPITest(unittest.TestCase):
self.assertRegex(err.replace(b'\r', b''),
br'Fatal Python error: a function returned NULL '
br'without setting an error\n'
br'Python runtime state: initialized\n'
br'SystemError: <built-in function '
br'return_null_without_error> returned NULL '
br'without setting an error\n'
@ -225,6 +226,7 @@ class CAPITest(unittest.TestCase):
self.assertRegex(err.replace(b'\r', b''),
br'Fatal Python error: a function returned a '
br'result with an error set\n'
br'Python runtime state: initialized\n'
br'ValueError\n'
br'\n'
br'The above exception was the direct cause '