some formatting for flake8

This commit is contained in:
misagh 2018-11-04 18:57:57 +01:00
parent 8ea9b3746b
commit ed24d96a79
2 changed files with 21 additions and 17 deletions

View File

@ -49,7 +49,9 @@ def patch_edge(mocker) -> None:
# "LTC/BTC", # "LTC/BTC",
# "XRP/BTC", # "XRP/BTC",
# "NEO/BTC" # "NEO/BTC"
pair_info = namedtuple('pair_info', 'stoploss, winrate, risk_reward_ratio, required_risk_reward, expectancy') pair_info = namedtuple(
'pair_info',
'stoploss, winrate, risk_reward_ratio, required_risk_reward, expectancy')
mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock( mocker.patch('freqtrade.edge.Edge._cached_pairs', mocker.PropertyMock(
return_value={ return_value={
'NEO/BTC': pair_info(-0.20, 0.66, 3.71, 0.50, 1.71), 'NEO/BTC': pair_info(-0.20, 0.66, 3.71, 0.50, 1.71),

View File

@ -213,6 +213,8 @@ def test_process_expectancy(mocker, default_conf):
assert round(final['TEST/BTC'].expectancy, 10) == 101.5128205128 assert round(final['TEST/BTC'].expectancy, 10) == 101.5128205128
# 1) Open trade should be removed from the end # 1) Open trade should be removed from the end
def test_case_1(mocker, default_conf): def test_case_1(mocker, default_conf):
exchange = get_patched_exchange(mocker, default_conf) exchange = get_patched_exchange(mocker, default_conf)
edge = Edge(default_conf, exchange) edge = Edge(default_conf, exchange)