Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmasse committed Sep 23, 2023
1 parent 3a40d9d commit d7e54b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lint: venv $(SUBDIR)/*.sh $(SUBDIR)/*.py
$(SHELLCHECK) $(SUBDIR)/*.sh
$(PYTHON) -m pylint $(SUBDIR)/*.py

test: venv $(SUBDIR)/*.py
test: venv $(SUBDIR)/*.py tests/*.py
$(PYTHON) -m pytest -v -x

all: lint test
Expand Down
6 changes: 4 additions & 2 deletions tests/test_yf_stock_ticker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import os
import sys
import yahooquery
import yf_stock_ticker.yf_stock_ticker as yf_stock_ticker

os.environ['TZ'] = 'UTC' # set default timezone

sample_quote_data = {'AAPL': {'averageDailyVolume10Day': {},
'averageDailyVolume3Month': {},
Expand All @@ -22,7 +24,7 @@
'postMarketChangePercent': 0.00091540517,
'postMarketPrice': 174.95,
'postMarketSource': 'DELAYED',
'postMarketTime': '2023-09-22 19:59:53',
'postMarketTime': '2023-09-22 23:59:53',
'preMarketChange': {},
'preMarketPrice': {},
'preMarketSource': 'FREE_REALTIME',
Expand All @@ -37,7 +39,7 @@
'regularMarketPreviousClose': 173.93,
'regularMarketPrice': 174.79,
'regularMarketSource': 'FREE_REALTIME',
'regularMarketTime': '2023-09-22 16:00:02',
'regularMarketTime': '2023-09-22 20:00:02',
'regularMarketVolume': 55110610,
'shortName': 'Apple Inc.',
'strikePrice': {},
Expand Down

0 comments on commit d7e54b6

Please sign in to comment.