Skip to content

Fixing tests for index.freq #814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pandas_datareader/tests/test_econdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def test_get_tourism(self):
expected = pd.Series(
values, index=index, name="Total international arrivals"
)
expected.index.freq = None
tm.assert_series_equal(
df[label]["Tourism demand surveys"]["Total international arrivals"],
expected,
Expand Down
1 change: 1 addition & 0 deletions pandas_datareader/tests/test_eurostat.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def test_get_sts_cobp_a(self):
uk = pd.Series(uk_values, name=uk_name, index=idx)

for expected in [ne, uk]:
expected.index.freq = None
result = df[expected.name]
tm.assert_series_equal(result, expected)

Expand Down
1 change: 1 addition & 0 deletions pandas_datareader/tests/test_fred.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def test_fred_multi(self): # pragma: no cover
index=[pd.Timestamp("2010-01-01 00:00:00")],
)
expected.index.rename("DATE", inplace=True)
expected.index.freq = "MS"
tm.assert_frame_equal(received, expected, check_less_precise=True)

def test_fred_multi_bad_series(self):
Expand Down
1 change: 1 addition & 0 deletions pandas_datareader/tests/test_oecd.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def test_get_tourism(self):
index = pd.date_range("2008-01-01", "2012-01-01", freq="AS", name="Year")
for label, values in [("Japan", jp), ("United States", us)]:
expected = pd.Series(values, index=index, name="Tourism demand surveys")
expected.index.freq = None
series = df[label]["Total international arrivals"]["Tourism demand surveys"]
tm.assert_series_equal(series, expected)

Expand Down