Add first tests for volatilityFilter
This commit is contained in:
parent
109824c9a8
commit
191616e4e5
@ -340,6 +340,10 @@ def test_VolumePairList_refresh_empty(mocker, markets_empty, whitelist_conf):
|
|||||||
([{"method": "VolumePairList", "number_assets": 20, "sort_key": "quoteVolume"},
|
([{"method": "VolumePairList", "number_assets": 20, "sort_key": "quoteVolume"},
|
||||||
{"method": "PriceFilter", "low_price_ratio": 0.02}],
|
{"method": "PriceFilter", "low_price_ratio": 0.02}],
|
||||||
"USDT", ['ETH/USDT', 'NANO/USDT']),
|
"USDT", ['ETH/USDT', 'NANO/USDT']),
|
||||||
|
([{"method": "StaticPairList"},
|
||||||
|
{"method": "VolatilityFilter", "volatility_over_days": 10,
|
||||||
|
"min_volatility": 0.01, "refresh_period": 1440}],
|
||||||
|
"BTC", ['ETH/BTC', 'TKN/BTC', 'HOT/BTC']),
|
||||||
])
|
])
|
||||||
def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, shitcoinmarkets, tickers,
|
def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, shitcoinmarkets, tickers,
|
||||||
ohlcv_history_list, pairlists, base_currency,
|
ohlcv_history_list, pairlists, base_currency,
|
||||||
@ -617,6 +621,11 @@ def test_agefilter_caching(mocker, markets, whitelist_conf_3, tickers, ohlcv_his
|
|||||||
None,
|
None,
|
||||||
"PriceFilter requires max_price to be >= 0"
|
"PriceFilter requires max_price to be >= 0"
|
||||||
), # OperationalException expected
|
), # OperationalException expected
|
||||||
|
({"method": "VolatilityFilter", "volatility_over_days": 10, "min_volatility": 0.01},
|
||||||
|
"[{'VolatilityFilter': 'VolatilityFilter - Filtering pairs with volatility below 0.01 "
|
||||||
|
"over the last days.'}]",
|
||||||
|
None
|
||||||
|
),
|
||||||
])
|
])
|
||||||
def test_pricefilter_desc(mocker, whitelist_conf, markets, pairlistconfig,
|
def test_pricefilter_desc(mocker, whitelist_conf, markets, pairlistconfig,
|
||||||
desc_expected, exception_expected):
|
desc_expected, exception_expected):
|
||||||
|
Loading…
Reference in New Issue
Block a user