fix tests
This commit is contained in:
@@ -34,7 +34,7 @@ def test_can_pass_strategy_as_string():
|
||||
result = research.backtest(config, routes, extra_routes, candles)
|
||||
|
||||
# result must have None values because the strategy makes no decisions
|
||||
assert result['metrics'] is None
|
||||
assert result['metrics'] == {'net_profit_percentage': 0, 'total': 0, 'win_rate': 0}
|
||||
assert result['charts'] is None
|
||||
assert result['logs'] is None
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_can_pass_strategy_as_class():
|
||||
result = research.backtest(config, routes, extra_routes, candles)
|
||||
|
||||
# result must have None values because the strategy makes no decisions
|
||||
assert result['metrics'] is None
|
||||
assert result['metrics'] == {'net_profit_percentage': 0, 'total': 0, 'win_rate': 0}
|
||||
assert result['charts'] is None
|
||||
assert result['logs'] is None
|
||||
|
||||
|
||||
@@ -874,8 +874,8 @@ def test_stop_loss_price_is_replaced_with_market_order():
|
||||
|
||||
def test_take_profit_price_is_replaced_with_market_order():
|
||||
# long position
|
||||
single_route_backtest('TestTakeProfitPriceIsReplacedWithMarketOrderWhenMoreConvenientLongPTestCanRunWithoutShortingsition')
|
||||
# # short position
|
||||
single_route_backtest('TestTakeProfitPriceIsReplacedWithMarketOrderWhenMoreConvenientLongPosition')
|
||||
# short position
|
||||
single_route_backtest('TestTakeProfitPriceIsReplacedWithMarketOrderWhenMoreConvenientShortPosition')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user