コード例 #1
0
def assert_correctly_loaded(expected, basedir, t0, t1, tag="test", tzinfo=utc):
    bazein = Bazesource(str(basedir))
    result = bazein(tag, t0, t1)

    new_index = result.index.tz_convert(tzinfo)
    result = result.reindex(new_index)
    pd.testing.assert_series_equal(expected, result)
コード例 #2
0
def assert_correct_index(expected_index, basedir, start_date, end_date,
                         tag="test"):
    bazein = Bazesource(str(basedir))
    result = bazein(tag, start_date, end_date)

    assert result.size == len(expected_index)
    assert (result.index == expected_index).all()