(unary_func_fixture)
| 602 | |
| 603 | |
| 604 | def test_scalar_udf_context(unary_func_fixture): |
| 605 | # Check the memory_pool argument is properly propagated |
| 606 | proxy_pool = pa.proxy_memory_pool(pa.default_memory_pool()) |
| 607 | _, func_name = unary_func_fixture |
| 608 | |
| 609 | res = pc.call_function(func_name, |
| 610 | [pa.array([1] * 1000, type=pa.int64())], |
| 611 | memory_pool=proxy_pool) |
| 612 | assert res == pa.array([2] * 1000, type=pa.int64()) |
| 613 | assert proxy_pool.bytes_allocated() == 1000 * 8 |
| 614 | # Destroying Python array should destroy underlying C++ memory |
| 615 | res = None |
| 616 | assert proxy_pool.bytes_allocated() == 0 |
| 617 | |
| 618 | |
| 619 | def test_raising_func(raising_func_fixture): |
nothing calls this directly
no test coverage detected