Skip to content

BUG/TST: Fix failing FRED comparison tests and remove skips. #4891

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 1 commit into from
Sep 20, 2013
Merged
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
7 changes: 2 additions & 5 deletions pandas/io/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ def test_fred(self):
FRED.
"""

raise nose.SkipTest('Skip as this is unstable #4427 ')
start = datetime(2010, 1, 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this skip too. The initial failure was due to a revision in the official GDP data. It should be stable now for at least 5 years: http://blog.bea.gov/2013/07/23/comprehensive-revisions-nipa/

An alternative would be to use FRED's ALFRED which archives values so you can get the reported value at a given data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your call

end = datetime(2013, 1, 27)

Expand All @@ -381,19 +380,17 @@ def test_fred(self):

@network
def test_fred_nan(self):
raise nose.SkipTest("Unstable test case - needs to be fixed.")
start = datetime(2010, 1, 1)
end = datetime(2013, 1, 27)
df = web.DataReader("DFII5", "fred", start, end)
assert pd.isnull(df.ix['2010-01-01'])
assert pd.isnull(df.ix['2010-01-01'][0])

@network
def test_fred_parts(self):
raise nose.SkipTest("Unstable test case - needs to be fixed.")
start = datetime(2010, 1, 1)
end = datetime(2013, 1, 27)
df = web.get_data_fred("CPIAUCSL", start, end)
self.assertEqual(df.ix['2010-05-01'], 217.23)
self.assertEqual(df.ix['2010-05-01'][0], 217.23)

t = df.CPIAUCSL.values
assert np.issubdtype(t.dtype, np.floating)
Expand Down