fixed tests except for one
This commit is contained in:
parent
6ace343d65
commit
e6d3a440cd
@ -149,11 +149,11 @@ class Trade(_DECL_BASE):
|
|||||||
close_date = Column(DateTime)
|
close_date = Column(DateTime)
|
||||||
open_order_id = Column(String)
|
open_order_id = Column(String)
|
||||||
# absolute value of the stop loss
|
# absolute value of the stop loss
|
||||||
stop_loss = Column(Float, nullable=False, default=0.0)
|
stop_loss = Column(Float, nullable=True, default=0.0)
|
||||||
# absolute value of the initial stop loss
|
# absolute value of the initial stop loss
|
||||||
initial_stop_loss = Column(Float, nullable=False, default=0.0)
|
initial_stop_loss = Column(Float, nullable=True, default=0.0)
|
||||||
# absolute value of the highest reached price
|
# absolute value of the highest reached price
|
||||||
max_rate = Column(Float, nullable=False, default=0.0)
|
max_rate = Column(Float, nullable=True, default=0.0)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'Trade(id={}, pair={}, amount={:.8f}, open_rate={:.8f}, open_since={})'.format(
|
return 'Trade(id={}, pair={}, amount={:.8f}, open_rate={:.8f}, open_since={})'.format(
|
||||||
|
@ -95,8 +95,7 @@ def simple_backtest(config, contour, num_results, mocker) -> None:
|
|||||||
'stake_amount': config['stake_amount'],
|
'stake_amount': config['stake_amount'],
|
||||||
'processed': processed,
|
'processed': processed,
|
||||||
'max_open_trades': 1,
|
'max_open_trades': 1,
|
||||||
'realistic': True,
|
'realistic': True
|
||||||
'trailing_stop' : False
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ def test_load_strategy_custom_directory(result):
|
|||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
FileNotFoundError,
|
FileNotFoundError,
|
||||||
match="FileNotFoundError: [WinError 3] The system cannot find the path specified: '{}'".format(extra_dir)):
|
match="FileNotFoundError: [WinError 3] The system cannot find the "
|
||||||
|
"path specified: '{}'".format(extra_dir)):
|
||||||
resolver._load_strategy('TestStrategy', extra_dir)
|
resolver._load_strategy('TestStrategy', extra_dir)
|
||||||
else:
|
else:
|
||||||
with pytest.raises(
|
with pytest.raises(
|
||||||
|
@ -444,6 +444,8 @@ def test_migrate_new(default_conf, fee):
|
|||||||
close_profit FLOAT,
|
close_profit FLOAT,
|
||||||
stake_amount FLOAT NOT NULL,
|
stake_amount FLOAT NOT NULL,
|
||||||
amount FLOAT,
|
amount FLOAT,
|
||||||
|
initial_stop_loss FLOAT,
|
||||||
|
max_rate FLOAT,
|
||||||
open_date DATETIME NOT NULL,
|
open_date DATETIME NOT NULL,
|
||||||
close_date DATETIME,
|
close_date DATETIME,
|
||||||
open_order_id VARCHAR,
|
open_order_id VARCHAR,
|
||||||
|
Loading…
Reference in New Issue
Block a user