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

Function raising_func_fixture

python/pyarrow/tests/test_udf.py:314–327  ·  view source on GitHub ↗

Register a scalar function which raises a custom exception.

()

Source from the content-addressed store, hash-verified

312
313@pytest.fixture(scope="session")
314def raising_func_fixture():
315 """
316 Register a scalar function which raises a custom exception.
317 """
318 def raising_func(ctx):
319 raise MyError("error raised by scalar UDF")
320 func_name = "test_raise"
321 doc = {
322 "summary": "raising function",
323 "description": ""
324 }
325 pc.register_scalar_function(raising_func, func_name, doc,
326 {}, pa.int64())
327 return raising_func, func_name
328
329
330@pytest.fixture(scope="session")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected