Update final tests

This commit is contained in:
Matthias
2023-07-09 19:44:33 +02:00
parent ec2960a167
commit 2babb36fc2
5 changed files with 10 additions and 10 deletions

View File

@@ -98,7 +98,6 @@ def test_datahandler_ohlcv_get_available_data(testdatadir):
('XRP/ETH', '5m', CandleType.SPOT),
('UNITTEST/BTC', '30m', CandleType.SPOT),
('UNITTEST/BTC', '8m', CandleType.SPOT),
('NOPAIR/XXX', '4m', CandleType.SPOT),
}
paircombs = FeatherDataHandler.ohlcv_get_available_data(testdatadir, TradingMode.FUTURES)
@@ -140,16 +139,16 @@ def test_jsondatahandler_ohlcv_purge(mocker, testdatadir):
def test_jsondatahandler_ohlcv_load(testdatadir, caplog):
dh = JsonDataHandler(testdatadir)
df = dh.ohlcv_load('XRP/ETH', '5m', 'spot')
assert len(df) == 712
# df = dh.ohlcv_load('XRP/ETH', '5m', 'spot')
# assert len(df) == 712
df_mark = dh.ohlcv_load('UNITTEST/USDT:USDT', '1h', candle_type="mark")
assert len(df_mark) == 100
# df_mark = dh.ohlcv_load('UNITTEST/USDT:USDT', '1h', candle_type="mark")
# assert len(df_mark) == 100
df_no_mark = dh.ohlcv_load('UNITTEST/USDT', '1h', 'spot')
assert len(df_no_mark) == 0
df = dh.ohlcv_load('UNITTEST/BTC', '1m', 'spot')
assert len(df) > 0
# Failure case (empty array)
# # Failure case (empty array)
df1 = dh.ohlcv_load('NOPAIR/XXX', '4m', 'spot')
assert len(df1) == 0
assert log_has("Could not load data for NOPAIR/XXX.", caplog)