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

Source from the content-addressed store, hash-verified

2356
2357
2358def test_date64_from_builtin_datetime():
2359 val1 = datetime.datetime(2000, 1, 1, 12, 34, 56, 123456)
2360 val2 = datetime.datetime(2000, 1, 1)
2361 result = pa.array([val1, val2], type='date64')
2362 result2 = pa.array([val1.date(), val2.date()], type='date64')
2363
2364 assert result.equals(result2)
2365
2366 as_i8 = result.view('int64')
2367 assert as_i8[0].as_py() == as_i8[1].as_py()
2368
2369
2370def 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