Make flake happy
This commit is contained in:
parent
50767cd569
commit
f48250b414
@ -596,35 +596,35 @@ def test_agefilter_caching(mocker, markets, whitelist_conf_3, tickers, ohlcv_his
|
|||||||
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below "
|
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below "
|
||||||
"0.1% or below 0.00000010 or above 1.00000000.'}]",
|
"0.1% or below 0.00000010 or above 1.00000000.'}]",
|
||||||
None
|
None
|
||||||
),
|
),
|
||||||
({"method": "PriceFilter", "low_price_ratio": 0.001, "min_price": 0.00000010},
|
({"method": "PriceFilter", "low_price_ratio": 0.001, "min_price": 0.00000010},
|
||||||
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.1% or below 0.00000010.'}]",
|
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.1% or below 0.00000010.'}]",
|
||||||
None
|
None
|
||||||
),
|
),
|
||||||
({"method": "PriceFilter", "low_price_ratio": 0.001, "max_price": 1.00010000},
|
({"method": "PriceFilter", "low_price_ratio": 0.001, "max_price": 1.00010000},
|
||||||
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.1% or above 1.00010000.'}]",
|
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.1% or above 1.00010000.'}]",
|
||||||
None
|
None
|
||||||
),
|
),
|
||||||
({"method": "PriceFilter", "min_price": 0.00002000},
|
({"method": "PriceFilter", "min_price": 0.00002000},
|
||||||
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.00002000.'}]",
|
"[{'PriceFilter': 'PriceFilter - Filtering pairs priced below 0.00002000.'}]",
|
||||||
None
|
None
|
||||||
),
|
),
|
||||||
({"method": "PriceFilter"},
|
({"method": "PriceFilter"},
|
||||||
"[{'PriceFilter': 'PriceFilter - No price filters configured.'}]",
|
"[{'PriceFilter': 'PriceFilter - No price filters configured.'}]",
|
||||||
None
|
None
|
||||||
),
|
),
|
||||||
({"method": "PriceFilter", "low_price_ratio": -0.001},
|
({"method": "PriceFilter", "low_price_ratio": -0.001},
|
||||||
None,
|
None,
|
||||||
"PriceFilter requires low_price_ratio be >= 0"
|
"PriceFilter requires low_price_ratio be >= 0"
|
||||||
), # OperationalException expected
|
), # OperationalException expected
|
||||||
({"method": "PriceFilter", "min_price": -0.00000010},
|
({"method": "PriceFilter", "min_price": -0.00000010},
|
||||||
None,
|
None,
|
||||||
"PriceFilter requires min_price be >= 0"
|
"PriceFilter requires min_price be >= 0"
|
||||||
), # OperationalException expected
|
), # OperationalException expected
|
||||||
({"method": "PriceFilter", "max_price": -1.00010000},
|
({"method": "PriceFilter", "max_price": -1.00010000},
|
||||||
None,
|
None,
|
||||||
"PriceFilter requires max_price be >= 0"
|
"PriceFilter requires max_price be >= 0"
|
||||||
), # OperationalException expected
|
), # OperationalException expected
|
||||||
])
|
])
|
||||||
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):
|
||||||
@ -638,7 +638,7 @@ def test_pricefilter_desc(mocker, whitelist_conf, markets, pairlistconfig,
|
|||||||
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
||||||
short_desc = str(freqtrade.pairlists.short_desc())
|
short_desc = str(freqtrade.pairlists.short_desc())
|
||||||
assert short_desc == desc_expected
|
assert short_desc == desc_expected
|
||||||
else: # # OperationalException expected
|
else: # OperationalException expected
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(OperationalException,
|
||||||
match=exception_expected):
|
match=exception_expected):
|
||||||
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
freqtrade = get_patched_freqtradebot(mocker, whitelist_conf)
|
||||||
|
Loading…
Reference in New Issue
Block a user