Issue #23571: Fix test_capi

This commit is contained in:
Victor Stinner 2015-03-21 17:24:50 +01:00
parent efde146b0c
commit 4f0efb0522
1 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ class CAPITest(unittest.TestCase):
_testcapi.return_null_without_error() _testcapi.return_null_without_error()
""") """)
rc, out, err = assert_python_failure('-c', code) rc, out, err = assert_python_failure('-c', code)
self.assertIn(b'_Py_CheckFunctionResult: Assertion', err) self.assertIn(b'_Py_CheckFunctionResult', err)
else: else:
with self.assertRaises(SystemError) as cm: with self.assertRaises(SystemError) as cm:
_testcapi.return_null_without_error() _testcapi.return_null_without_error()
@ -203,7 +203,7 @@ class CAPITest(unittest.TestCase):
_testcapi.return_result_with_error() _testcapi.return_result_with_error()
""") """)
rc, out, err = assert_python_failure('-c', code) rc, out, err = assert_python_failure('-c', code)
self.assertIn(b'_Py_CheckFunctionResult: Assertion', err) self.assertIn(b'_Py_CheckFunctionResult', err)
else: else:
with self.assertRaises(SystemError) as cm: with self.assertRaises(SystemError) as cm:
_testcapi.return_result_with_error() _testcapi.return_result_with_error()