Merge pull request #2903 from hroff-1902/fix/tests_history-2

Minor: Fix tests_history.py
This commit is contained in:
Matthias 2020-02-11 07:14:13 +01:00 committed by GitHub
commit 59a576ef3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -420,7 +420,7 @@ def test_trim_tickerlist(testdatadir) -> None:
# Test the pattern ^(\d{8})-$
# This pattern extracts elements from the date to now
timerange = TimeRange('date', None, ticker_list[10][0] / 1000 - 1, None)
timerange = TimeRange('date', None, ticker_list[10][0] / 1000 - 1, 0)
ticker = trim_tickerlist(ticker_list, timerange)
ticker_len = len(ticker)
@ -430,14 +430,14 @@ def test_trim_tickerlist(testdatadir) -> None:
# Test a wrong pattern
# This pattern must return the list unchanged
timerange = TimeRange(None, None, None, 5)
timerange = TimeRange(None, None, 0, 5)
ticker = trim_tickerlist(ticker_list, timerange)
ticker_len = len(ticker)
assert ticker_list_len == ticker_len
# passing empty list
timerange = TimeRange(None, None, None, 5)
timerange = TimeRange(None, None, 0, 5)
ticker = trim_tickerlist([], timerange)
assert 0 == len(ticker)
assert not ticker