MCPcopy Create free account
hub / github.com/apache/arrow / test_interval_array_from_tuple

Function test_interval_array_from_tuple

python/pyarrow/tests/test_array.py:2895–2907  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2893
2894
2895def test_interval_array_from_tuple():
2896 data = [None, (1, 2, -3)]
2897
2898 # From timedelta (explicit type required)
2899 arr = pa.array(data, pa.month_day_nano_interval())
2900 assert isinstance(arr, pa.MonthDayNanoIntervalArray)
2901 assert arr.type == pa.month_day_nano_interval()
2902 expected_list = [
2903 None,
2904 pa.MonthDayNano([1, 2, -3])]
2905 expected = pa.array(expected_list)
2906 assert arr.equals(expected)
2907 assert arr.to_pylist() == expected_list
2908
2909
2910@pytest.mark.pandas

Callers

nothing calls this directly

Calls 2

equalsMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected