Exemplo n.º 1
0
def test_comparison_sampled1():
    for date0 in data.sample_dates(3881):
        for date1 in data.sample_dates(3391):
            assert date0 < date1 or date0 == date1 or date0 > date1
            assert date0 == date1 or date0 != date1
            assert date0.is_same(date1) ^ (date0 != date1)
Exemplo n.º 2
0
def test_vs_date_sampled():
    for date in data.sample_dates():
        ref = datetime.date.fromordinal(1 + date.datenum)
        assert date.year    == ref.year
        assert date.month   == ref.month
        assert date.day     == date.day