(typ)
| 405 | |
| 406 | @pytest.mark.parametrize("typ", [pa.date32(), pa.date64()]) |
| 407 | def 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 |