Skip to content

Commit c67551c

Browse files
committed
Update test for asserting df
1 parent 6761cf8 commit c67551c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/test_ticker.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,14 @@ def test_bad_financials_arg():
127127

128128

129129
def test_get_financial_data(ticker):
130-
assert (
131-
ticker.get_financial_data("GrossProfit NetIncome TotalAssets ForwardPeRatio")
132-
is not None
130+
result = ticker.get_financial_data(
131+
"GrossProfit NetIncome TotalAssets ForwardPeRatio"
133132
)
133+
assert result is not None
134+
if isinstance(result, str):
135+
assert "unavailable" in result.lower()
136+
else:
137+
assert isinstance(result, pd.DataFrame)
134138

135139

136140
def test_p_get_financial_data(ticker):

0 commit comments

Comments
 (0)