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

Function test_cast_string_to_date

python/pyarrow/tests/test_scalars.py:407–410  ·  view source on GitHub ↗
(typ)

Source from the content-addressed store, hash-verified

405
406@pytest.mark.parametrize("typ", [pa.date32(), pa.date64()])
407def test_cast_string_to_date(typ):
408 scalar = pa.scalar('2021-01-01')
409 result = scalar.cast(typ)
410 assert result == pa.scalar(datetime.date(2021, 1, 1), type=typ)
411
412
413@pytest.mark.pandas

Callers

nothing calls this directly

Calls 3

scalarMethod · 0.45
castMethod · 0.45
dateMethod · 0.45

Tested by

no test coverage detected