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

Function test_date

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

Source from the content-addressed store, hash-verified

300
301
302def test_date():
303 # ARROW-5125
304 d1 = datetime.date(3200, 1, 1)
305 d2 = datetime.date(1960, 1, 1)
306
307 for ty in [pa.date32(), pa.date64()]:
308 for d in [d1, d2]:
309 s = pa.scalar(d, type=ty)
310 assert s.as_py() == d
311
312
313def test_date_cast():

Callers

nothing calls this directly

Calls 3

as_pyMethod · 0.80
dateMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected