()
| 303 | |
| 304 | @needs_cffi |
| 305 | def test_export_import_schema_float_pointer(): |
| 306 | # Previous versions of the R Arrow library used to pass pointer |
| 307 | # values as a double. |
| 308 | c_schema = ffi.new("struct ArrowSchema*") |
| 309 | ptr_schema = int(ffi.cast("uintptr_t", c_schema)) |
| 310 | |
| 311 | match = "Passing a pointer value as a float is unsafe" |
| 312 | with pytest.warns(UserWarning, match=match): |
| 313 | make_schema()._export_to_c(float(ptr_schema)) |
| 314 | with pytest.warns(UserWarning, match=match): |
| 315 | schema_new = pa.Schema._import_from_c(float(ptr_schema)) |
| 316 | assert schema_new == make_schema() |
| 317 | |
| 318 | |
| 319 | def check_export_import_batch(array_type, exporter, importer, batch_factory): |
nothing calls this directly
no test coverage detected