diff --git a/tests/conftest.py b/tests/conftest.py index de6f662a9..e175f2034 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -112,6 +112,8 @@ def generate_test_data(timeframe: str, size: int, start: str = '2020-07-05'): base = np.random.normal(20, 2, size=size) if timeframe == '1M': date = pd.date_range(start, periods=size, freq='1MS', tz='UTC') + elif timeframe == '3M': + date = pd.date_range(start, periods=size, freq='3MS', tz='UTC') elif timeframe == '1w': date = pd.date_range(start, periods=size, freq='1W-MON', tz='UTC') else: diff --git a/tests/data/test_converter.py b/tests/data/test_converter.py index 50ace7352..993e956cb 100644 --- a/tests/data/test_converter.py +++ b/tests/data/test_converter.py @@ -133,15 +133,15 @@ def test_ohlcv_fill_up_missing_data2(caplog): @pytest.mark.parametrize('timeframe', [ - '1m', '5m', '15m', '1h', '2h', '4h', '8h', '12h', '1d', '7d', '1w', '1M', '1y' + '1m', '5m', '15m', '1h', '2h', '4h', '8h', '12h', '1d', '7d', '1w', '1M', '3M', '1y' ]) def test_ohlcv_to_dataframe_multi(timeframe): data = generate_test_data(timeframe, 40) assert len(data) == 40 df = ohlcv_to_dataframe(data, timeframe, 'UNITTEST/USDT') assert len(df) == len(data) - 1 - df = ohlcv_to_dataframe(data, timeframe, 'UNITTEST/USDT', drop_incomplete=False) - assert len(df) == len(data) + df1 = ohlcv_to_dataframe(data, timeframe, 'UNITTEST/USDT', drop_incomplete=False) + assert len(df1) == len(data) def test_ohlcv_to_dataframe_1M():