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

Function test_cast_date64_to_int

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

Source from the content-addressed store, hash-verified

2346
2347@pytest.mark.numpy
2348def test_cast_date64_to_int():
2349 arr = pa.array(np.array([0, 1, 2], dtype='int64'),
2350 type=pa.date64())
2351 expected = pa.array([0, 1, 2], type='i8')
2352
2353 result = arr.cast('i8')
2354
2355 assert result.equals(expected)
2356
2357
2358def test_date64_from_builtin_datetime():

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
arrayMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected