MCPcopy Create free account
hub / github.com/apache/arrow / TestCheckPyErrorStatusNoGIL

Function TestCheckPyErrorStatusNoGIL

python/pyarrow/src/arrow/python/python_test.cc:245–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245Status TestCheckPyErrorStatusNoGIL() {
246 PyAcquireGIL lock;
247 {
248 Status st;
249 PyErr_SetString(PyExc_ZeroDivisionError, "zzzt");
250 st = ConvertPyError();
251 ASSERT_FALSE(PyErr_Occurred());
252 lock.release();
253 ASSERT_TRUE(st.IsUnknownError());
254 ASSERT_EQ(st.message(), "zzzt");
255 ASSERT_EQ(st.detail()->ToString(),
256 FormatPythonException("ZeroDivisionError", "zzzt"));
257 return Status::OK();
258 }
259}
260
261Status TestRestorePyErrorBasics() {
262 PyErr_SetString(PyExc_ZeroDivisionError, "zzzt");

Callers

nothing calls this directly

Calls 5

ConvertPyErrorFunction · 0.85
FormatPythonExceptionFunction · 0.85
OKFunction · 0.50
releaseMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected