bpo-9263: _Py_NegativeRefcount() use _PyObject_AssertFailed() (GH-10109)

_Py_NegativeRefcount() now uses _PyObject_AssertFailed() to dump the
object to help debugging.
This commit is contained in:
Victor Stinner 2018-10-26 02:12:34 +02:00 committed by GitHub
parent c89a932714
commit 3ec9af75f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View file

@ -329,8 +329,9 @@ class CAPITest(unittest.TestCase):
""")
rc, out, err = assert_python_failure('-c', code)
self.assertRegex(err,
br'_testcapimodule\.c:[0-9]+ object at .* '
br'has negative ref count', err)
br'_testcapimodule\.c:[0-9]+: '
br'_Py_NegativeRefcount: Assertion ".*" failed; '
br'object has negative ref count')
class TestPendingCalls(unittest.TestCase):