def test_deserialize_buffer_in_different_process(): import tempfile f = tempfile.NamedTemporaryFile(delete=False) b = pa.serialize(pa.py_buffer(b'hello')).to_buffer() f.write(b.to_pybytes()) f.close() test_util.invoke_script('deserialize_buffer.py', f.name)
def test_read_year_month_nano_interval(tmpdir): """ARROW-15783: Verify to_pandas works for interval types. Interval types require static structures to be enabled. This test verifies that they are when no other library functions are invoked. """ mdn_interval_type = pa.month_day_nano_interval() schema = pa.schema([pa.field('nums', mdn_interval_type)]) path = tmpdir.join('file.arrow').strpath with pa.OSFile(path, 'wb') as sink: with pa.ipc.new_file(sink, schema) as writer: interval_array = pa.array([(1, 2, 3)], type=mdn_interval_type) batch = pa.record_batch([interval_array], schema) writer.write(batch) invoke_script('read_record_batch.py', path)
def test_type_to_pandas_dtype_check_import(): # ARROW-7980 test_util.invoke_script('arrow_7980.py')