Skip to content

Commit

Permalink
BUG: Skip tests for google quotes
Browse files Browse the repository at this point in the history
Add note to docs re: status of google quotes
  • Loading branch information
David Stephens committed Oct 1, 2017
1 parent 7d8803d commit cffa531
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
10 changes: 6 additions & 4 deletions docs/source/remote_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ Google Finance Quotes

The GoogleQuotesReader class allows to get quotes data from Google Finance.

.. ipython:: python
OFFLINE AS OF OCT 1, 2017

import pandas_datareader.data as web
q = web.get_quote_google(['AMZN', 'GOOG'])
q
.. .. ipython:: python
.. import pandas_datareader.data as web
.. q = web.get_quote_google(['AMZN', 'GOOG'])
.. q
.. _remote_data.google_options:

Expand Down
4 changes: 3 additions & 1 deletion pandas_datareader/google/quotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

class GoogleQuotesReader(_BaseReader):

"""Get current google quote"""
"""Get current google quote
WARNING: OFFLINE AS OF OCT 1, 2017
"""

@property
def url(self):
Expand Down
10 changes: 6 additions & 4 deletions pandas_datareader/tests/google/test_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_google(self):

for locale in self.locales:
with tm.set_locale(locale):
panel = web.DataReader("F", 'google', start, end)
panel = web.DataReader("NYSE:F", 'google', start, end)
assert panel.Close[-1] == 13.68

with pytest.raises(Exception):
Expand All @@ -82,12 +82,14 @@ def assert_option_result(self, df):
tm.assert_series_equal(df.dtypes, pd.Series(dtypes, index=exp_columns))

def test_get_quote_string(self):
pytest.skip("Google quote api is offline as of Oct 1, 2017")
df = web.get_quote_google('GOOG')
assert df.loc['GOOG', 'last'] > 0.0
tm.assert_index_equal(df.index, pd.Index(['GOOG']))
self.assert_option_result(df)

def test_get_quote_stringlist(self):
pytest.skip("Google quote api is offline as of Oct 1, 2017")
df = web.get_quote_google(['GOOG', 'AMZN', 'GOOG'])
assert_series_equal(df.iloc[0], df.iloc[2])
tm.assert_index_equal(df.index, pd.Index(['GOOG', 'AMZN', 'GOOG']))
Expand Down Expand Up @@ -143,7 +145,7 @@ def test_get_multi2(self):

def test_dtypes(self):
# see gh-3995, gh-8980
data = web.get_data_google('F', start='JAN-01-10', end='JAN-27-13')
data = web.get_data_google('NYSE:F', start='JAN-01-10', end='JAN-27-13')
assert np.issubdtype(data.Open.dtype, np.number)
assert np.issubdtype(data.Close.dtype, np.number)
assert np.issubdtype(data.Low.dtype, np.number)
Expand All @@ -152,7 +154,7 @@ def test_dtypes(self):

def test_unicode_date(self):
# see gh-8967
data = web.get_data_google('F', start='JAN-01-10', end='JAN-27-13')
data = web.get_data_google('NYSE:F', start='JAN-01-10', end='JAN-27-13')
assert data.index.name == 'Date'

def test_google_reader_class(self):
Expand All @@ -167,4 +169,4 @@ def test_google_reader_class(self):
def test_bad_retry_count(self):

with pytest.raises(ValueError):
web.get_data_google('F', retry_count=-1)
web.get_data_google('NYSE:F', retry_count=-1)

0 comments on commit cffa531

Please sign in to comment.