def test_date_from_timestamp(d): if PYPY and d < pdt.date(1900, 1, 1): pytest.xfail( "pdt.datetime.timestamp will raise on PyPy with dates before 1900") ts = pdt.datetime.timestamp(pdt.datetime.combine(d, pdt.time(0))) assert rdt.date_from_timestamp(int(ts)) == pdt.date.fromtimestamp(ts)
def test_date_from_timestamp(d): ts = get_timestamp(pdt.datetime.combine(d, pdt.time(0))) assert rdt.date_from_timestamp(int(ts)) == pdt.date.fromtimestamp(ts)