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

Function test_date64_from_builtin_datetime

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

Source from the content-addressed store, hash-verified

2206
2207
2208def test_date64_from_builtin_datetime():
2209 val1 = datetime.datetime(2000, 1, 1, 12, 34, 56, 123456)
2210 val2 = datetime.datetime(2000, 1, 1)
2211 result = pa.array([val1, val2], type='date64')
2212 result2 = pa.array([val1.date(), val2.date()], type='date64')
2213
2214 assert result.equals(result2)
2215
2216 as_i8 = result.view('int64')
2217 assert as_i8[0].as_py() == as_i8[1].as_py()
2218
2219
2220def test_create_date32_and_date64_arrays_with_mask():

Callers

nothing calls this directly

Calls 6

datetimeMethod · 0.80
equalsMethod · 0.80
as_pyMethod · 0.80
arrayMethod · 0.45
dateMethod · 0.45
viewMethod · 0.45

Tested by

no test coverage detected