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

Function test_timestamp_no_overflow

python/pyarrow/tests/test_scalars.py:466–478  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464
465
466def test_timestamp_no_overflow():
467 # ARROW-5450
468 pytest.importorskip("pytz")
469 import pytz
470
471 timestamps = [
472 datetime.datetime(1, 1, 1, 0, 0, 0, tzinfo=pytz.utc),
473 datetime.datetime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=pytz.utc),
474 datetime.datetime(1970, 1, 1, 0, 0, 0, tzinfo=pytz.utc),
475 ]
476 for ts in timestamps:
477 s = pa.scalar(ts, type=pa.timestamp("us", tz="UTC"))
478 assert s.as_py() == ts
479
480
481def test_timestamp_fixed_offset_print():

Callers

nothing calls this directly

Calls 3

datetimeMethod · 0.80
as_pyMethod · 0.80
scalarMethod · 0.45

Tested by

no test coverage detected