mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 16:43:06 +00:00
Merge branch 'feat/short' into pr/samgermain/5780
This commit is contained in:
@@ -441,7 +441,8 @@ def test_backtesting_no_pair_left(default_conf, mocker, caplog, testdatadir) ->
|
||||
Backtesting(default_conf)
|
||||
|
||||
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)
|
||||
|
||||
default_conf.update({
|
||||
@@ -473,7 +474,8 @@ def test_backtesting_pairlist_list(default_conf, mocker, caplog, testdatadir, ti
|
||||
default_conf['timerange'] = '20180101-20180102'
|
||||
|
||||
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)
|
||||
|
||||
default_conf['pairlists'] = [{"method": "StaticPairList"}, {"method": "PerformanceFilter"}]
|
||||
@@ -698,7 +700,7 @@ def test_backtest_one(default_conf, fee, mocker, testdatadir) -> None:
|
||||
'min_rate': [0.10370188, 0.10300000000000001],
|
||||
'max_rate': [0.10501, 0.1038888],
|
||||
'is_open': [False, False],
|
||||
'buy_tag': [None, None],
|
||||
'enter_tag': [None, None],
|
||||
"is_short": [False, False],
|
||||
})
|
||||
pd.testing.assert_frame_equal(results, expected)
|
||||
|
||||
Reference in New Issue
Block a user