(mod)
| 66 | |
| 67 | |
| 68 | def check_cython_example_module(mod): |
| 69 | arr = pa.array([1, 2, 3]) |
| 70 | assert mod.get_array_length(arr) == 3 |
| 71 | with pytest.raises(TypeError, match="not an array"): |
| 72 | mod.get_array_length(None) |
| 73 | |
| 74 | scal = pa.scalar(123) |
| 75 | cast_scal = mod.cast_scalar(scal, pa.utf8()) |
| 76 | assert cast_scal == pa.scalar("123") |
| 77 | with pytest.raises(NotImplementedError, |
| 78 | match="Unsupported cast from int64 to list using function " |
| 79 | "cast_list"): |
| 80 | mod.cast_scalar(scal, pa.list_(pa.int64())) |
| 81 | |
| 82 | |
| 83 | # NumPy is still a required build dependency. It is present in our |
no test coverage detected