From 2d273a8509c234c4f8e0c03c398752b102bee3ec Mon Sep 17 00:00:00 2001 From: Jean-Baptiste LE STANG Date: Wed, 3 Jan 2018 11:30:24 +0100 Subject: [PATCH] Update unittests --- freqtrade/tests/optimize/test_backtesting.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/freqtrade/tests/optimize/test_backtesting.py b/freqtrade/tests/optimize/test_backtesting.py index 8b416e64e..3b5cd5fd6 100644 --- a/freqtrade/tests/optimize/test_backtesting.py +++ b/freqtrade/tests/optimize/test_backtesting.py @@ -16,15 +16,17 @@ def test_generate_text_table(): 'currency': ['BTC_ETH', 'BTC_ETH'], 'profit_percent': [0.1, 0.2], 'profit_BTC': [0.2, 0.4], - 'duration': [10, 30] + 'duration': [10, 30], + 'profit': [2,0], + 'loss': [0,0] } ) print(generate_text_table({'BTC_ETH': {}}, results, 'BTC', 5)) assert generate_text_table({'BTC_ETH': {}}, results, 'BTC', 5) == ( - 'pair buy count avg profit % total profit BTC avg duration\n' - '------- ----------- -------------- ------------------ --------------\n' - 'BTC_ETH 2 15.00 0.60000000 100.0\n' - 'TOTAL 2 15.00 0.60000000 100.0') + 'pair buy count avg profit % total profit BTC avg duration profit loss\n' + '------- ----------- -------------- ------------------ -------------- -------- ------\n' + 'BTC_ETH 2 15.00 0.60000000 100.0 2 0\n' + 'TOTAL 2 15.00 0.60000000 100.0 2 0') def test_get_timeframe():