Skip to content

Commit

Permalink
Fix Yahoo Data Provider unit test (#309) (#310)
Browse files Browse the repository at this point in the history
(cherry picked from commit 98ac87a)

Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com>
  • Loading branch information
mergify[bot] and woodsp-ibm authored Nov 20, 2023
1 parent bd7ac7f commit c7abca8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/data_providers/test_data_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,15 @@ def test_exchangedata(self):
self.fail(f"Test of ExchangeDataProvider failed: {str(ex)}")

@data(
[["MSFT", "AAPL"], [[1349, 476.0], [476.0, 211.0]], [[1.0, 2.99e-05], [2.99e-05, 1.0]]],
["MSFT", 1349.0, [[1.0]]],
[["MSFT", "AAPL"], [[1344, 474.0], [474.0, 211.0]], [[1.0, 2.99e-05], [2.99e-05, 1.0]]],
["MSFT", 1344.0, [[1.0]]],
)
@unpack
def test_yahoo(self, tickers, covariance, similarity):
"""Yahoo data test"""
"""Yahoo data test."""
# Note: Unit test reference values above seem to need updating periodically as the
# data fetched seems to differ slightly presumably due to database being updated and
# maybe historical data compressed or something.
yahoo = YahooDataProvider(
tickers=tickers,
start=datetime.datetime(2021, 1, 1),
Expand Down

0 comments on commit c7abca8

Please sign in to comment.