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:2301–2310  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2299
2300
2301def test_date64_from_builtin_datetime():
2302 val1 = datetime.datetime(2000, 1, 1, 12, 34, 56, 123456)
2303 val2 = datetime.datetime(2000, 1, 1)
2304 result = pa.array([val1, val2], type='date64')
2305 result2 = pa.array([val1.date(), val2.date()], type='date64')
2306
2307 assert result.equals(result2)
2308
2309 as_i8 = result.view('int64')
2310 assert as_i8[0].as_py() == as_i8[1].as_py()
2311
2312
2313def 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