fix tests

This commit is contained in:
Saleh Mir
2022-02-21 10:06:03 +01:00
parent 18da8c87b7
commit 94460749cc
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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')