def test_table(): frame = read("price.csv", index_col=0) columns, data = frame2table(frame) assert columns assert data
def test_lines(): frame = read("price.csv", index_col=0) assert frame2lines(frame)
def test_href(): frame = read("price.csv", index_col=0) assert frame2href(frame)
def price(): ts = read("price.csv", index_col=0, header=0, parse_dates=True)["A"] assert isinstance(ts, pd.Series) return ts
def test_reference(client): response = get(client=client, url="/whoosh/json").data.decode() frame = read("whoosh.csv", index_col=0, header=0)[["content", "group", "path", "title"]] pt.assert_frame_equal( pd.read_json(response, orient="table")[frame.keys()], frame)
def test_cache(): prices = read("price.csv", index_col=0, parse_dates=True) x = Cache.to_json(frame=prices) pt.assert_frame_equal(prices, Cache.read_json(x), check_names=False)