| 196 | |
| 197 | @pytest.mark.timezone_data |
| 198 | def test_timestamp_scalar(): |
| 199 | a = repr(pa.scalar("0000-01-01").cast(pa.timestamp("s"))) |
| 200 | assert a == "<pyarrow.TimestampScalar: '0000-01-01T00:00:00'>" |
| 201 | b = repr(pa.scalar(datetime.datetime(2015, 1, 1), type=pa.timestamp('s', tz='UTC'))) |
| 202 | assert b == "<pyarrow.TimestampScalar: '2015-01-01T00:00:00+0000'>" |
| 203 | c = repr(pa.scalar(datetime.datetime(2015, 1, 1), type=pa.timestamp('us'))) |
| 204 | assert c == "<pyarrow.TimestampScalar: '2015-01-01T00:00:00.000000'>" |
| 205 | d = repr(pc.assume_timezone( |
| 206 | pa.scalar("2000-01-01").cast(pa.timestamp("s")), "America/New_York")) |
| 207 | assert d == "<pyarrow.TimestampScalar: '2000-01-01T00:00:00-0500'>" |
| 208 | |
| 209 | |
| 210 | def test_bool(): |