From 7ab2498544a02358a9fa4df3fe05821090b54eb2 Mon Sep 17 00:00:00 2001 From: Gerald Lonlas Date: Sun, 28 Jan 2018 15:33:57 -0800 Subject: [PATCH] Increase test coverage on optimize.py --- freqtrade/tests/optimize/test_optimize.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/freqtrade/tests/optimize/test_optimize.py b/freqtrade/tests/optimize/test_optimize.py index 3247ca7c0..e893e4826 100644 --- a/freqtrade/tests/optimize/test_optimize.py +++ b/freqtrade/tests/optimize/test_optimize.py @@ -260,6 +260,14 @@ def test_trim_tickerlist(): assert ticker_list[5] is ticker[0] # The list starts at the index 5 assert ticker_list[9] is ticker[-1] # The list ends at the index 9 (5 elements) + # Test a wrong pattern + # This pattern must return the list unchanged + timerange = ((None, None), None, 5) + ticker = trim_tickerlist(ticker_list, timerange) + ticker_len = len(ticker) + + assert ticker_list_len == ticker_len + def test_file_dump_json():