()
| 375 | |
| 376 | @pytest.mark.timezone_data |
| 377 | def test_cast_timestamp_to_string(): |
| 378 | # GH-35370 |
| 379 | pytest.importorskip("pytz") |
| 380 | import pytz |
| 381 | dt = datetime.datetime(2000, 1, 1, 0, 0, 0, tzinfo=pytz.utc) |
| 382 | ts = pa.scalar(dt, type=pa.timestamp("ns", tz="UTC")) |
| 383 | assert ts.cast(pa.string()) == pa.scalar('2000-01-01 00:00:00.000000000Z') |
| 384 | |
| 385 | |
| 386 | def test_cast_float_to_int(): |