Skip to content

Commit

Permalink
Fix tests in test_history.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hroff-1902 committed Feb 11, 2020
1 parent da03c36 commit 62bcb3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/data/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 62bcb3d

Please sign in to comment.