|
5 | 5 | @pytest.mark.parametrize("symbol", ["001979","600177","000333","601857","600050","600941","601728","601319", |
6 | 6 | "600704","600886","601880","601998","600999","000001","601318", |
7 | 7 | "601288","601988","601939","601398"]) |
8 | | -def test_equity_historical(symbol, default_provider): |
9 | | - df = obb.equity.price.historical(symbol=symbol, provider=default_provider).to_dataframe() |
| 8 | +@pytest.mark.parametrize("use_cache", [True, False]) |
| 9 | +def test_equity_historical(symbol, default_provider, use_cache): |
| 10 | + df = obb.equity.price.historical(symbol=symbol, provider=default_provider, use_cache=use_cache).to_dataframe() |
10 | 11 | assert isinstance(df, pd.DataFrame) |
11 | 12 |
|
12 | 13 |
|
13 | | -@pytest.mark.parametrize("symbol", ["001979","600177","000333","601857","600050","600941","601728","601319", |
| 14 | +@pytest.mark.parametrize("symbol", ["01658", "00300"]) |
| 15 | +@pytest.mark.parametrize("use_cache", [True, False]) |
| 16 | +def test_equity_historical_with_dates(symbol, default_provider, use_cache): |
| 17 | + df = obb.equity.price.historical(symbol=symbol, provider=default_provider, |
| 18 | + start_date="2024-09-08", end_date="2025-09-08", |
| 19 | + use_cache=use_cache).to_dataframe() |
| 20 | + assert isinstance(df, pd.DataFrame) |
| 21 | + |
| 22 | + |
| 23 | +@pytest.mark.parametrize("symbol", ["01658", "001979","600177","000333","601857","600050","600941","601728","601319", |
14 | 24 | "600704","600886","601880","601998","600999","000001","601318", |
15 | 25 | "601288","601988","601939","601398"]) |
16 | 26 | def test_equity_info(symbol, akshare_api_key, logger): |
|
0 commit comments