Added XRP_USDT-1h-mark json testdat file, and test for ohlcv_load with candle_type=mark

This commit is contained in:
Sam Germain
2021-11-19 03:55:52 -06:00
parent 043ed3e330
commit 91a11d01e9
2 changed files with 108 additions and 0 deletions

View File

@@ -669,6 +669,12 @@ def test_jsondatahandler_ohlcv_load(testdatadir, caplog):
df = dh.ohlcv_load('XRP/ETH', '5m')
assert len(df) == 711
df_mark = dh.ohlcv_load('XRP/USDT', '1h', candle_type="mark")
assert len(df_mark) == 99
df_no_mark = dh.ohlcv_load('XRP/USDT', '1h')
assert len(df_no_mark) == 0
# Failure case (empty array)
df1 = dh.ohlcv_load('NOPAIR/XXX', '4m')
assert len(df1) == 0