()
| 336 | |
| 337 | @needs_cffi |
| 338 | def test_export_import_schema_float_pointer(): |
| 339 | # Previous versions of the R Arrow library used to pass pointer |
| 340 | # values as a double. |
| 341 | c_schema = ffi.new("struct ArrowSchema*") |
| 342 | ptr_schema = int(ffi.cast("uintptr_t", c_schema)) |
| 343 | |
| 344 | match = "Passing a pointer value as a float is unsafe" |
| 345 | with pytest.warns(UserWarning, match=match): |
| 346 | make_schema()._export_to_c(float(ptr_schema)) |
| 347 | with pytest.warns(UserWarning, match=match): |
| 348 | schema_new = pa.Schema._import_from_c(float(ptr_schema)) |
| 349 | assert schema_new == make_schema() |
| 350 | |
| 351 | |
| 352 | def check_export_import_batch(array_type, exporter, importer, batch_factory): |
nothing calls this directly
no test coverage detected