Merge pull request #5964 from stash86/fix-docs
Add more words on VolumePairlist backtest error message
This commit is contained in:
commit
450293878f
@ -89,7 +89,8 @@ class Backtesting:
|
|||||||
self.init_backtest_detail()
|
self.init_backtest_detail()
|
||||||
self.pairlists = PairListManager(self.exchange, self.config)
|
self.pairlists = PairListManager(self.exchange, self.config)
|
||||||
if 'VolumePairList' in self.pairlists.name_list:
|
if 'VolumePairList' in self.pairlists.name_list:
|
||||||
raise OperationalException("VolumePairList not allowed for backtesting.")
|
raise OperationalException("VolumePairList not allowed for backtesting. "
|
||||||
|
"Please use StaticPairlist instead.")
|
||||||
if 'PerformanceFilter' in self.pairlists.name_list:
|
if 'PerformanceFilter' in self.pairlists.name_list:
|
||||||
raise OperationalException("PerformanceFilter not allowed for backtesting.")
|
raise OperationalException("PerformanceFilter not allowed for backtesting.")
|
||||||
|
|
||||||
|
@ -438,7 +438,8 @@ def test_backtesting_no_pair_left(default_conf, mocker, caplog, testdatadir) ->
|
|||||||
Backtesting(default_conf)
|
Backtesting(default_conf)
|
||||||
|
|
||||||
default_conf['pairlists'] = [{"method": "VolumePairList", "number_assets": 5}]
|
default_conf['pairlists'] = [{"method": "VolumePairList", "number_assets": 5}]
|
||||||
with pytest.raises(OperationalException, match='VolumePairList not allowed for backtesting.'):
|
with pytest.raises(OperationalException,
|
||||||
|
match=r'VolumePairList not allowed for backtesting\..*StaticPairlist.*'):
|
||||||
Backtesting(default_conf)
|
Backtesting(default_conf)
|
||||||
|
|
||||||
default_conf.update({
|
default_conf.update({
|
||||||
@ -470,7 +471,8 @@ def test_backtesting_pairlist_list(default_conf, mocker, caplog, testdatadir, ti
|
|||||||
default_conf['timerange'] = '20180101-20180102'
|
default_conf['timerange'] = '20180101-20180102'
|
||||||
|
|
||||||
default_conf['pairlists'] = [{"method": "VolumePairList", "number_assets": 5}]
|
default_conf['pairlists'] = [{"method": "VolumePairList", "number_assets": 5}]
|
||||||
with pytest.raises(OperationalException, match='VolumePairList not allowed for backtesting.'):
|
with pytest.raises(OperationalException,
|
||||||
|
match=r'VolumePairList not allowed for backtesting\..*StaticPairlist.*'):
|
||||||
Backtesting(default_conf)
|
Backtesting(default_conf)
|
||||||
|
|
||||||
default_conf['pairlists'] = [{"method": "StaticPairList"}, {"method": "PerformanceFilter"}]
|
default_conf['pairlists'] = [{"method": "StaticPairList"}, {"method": "PerformanceFilter"}]
|
||||||
|
Loading…
Reference in New Issue
Block a user