Skip to content

Commit ed89690

Browse files
author
y-p
committed
BUG: test_yahoo provider results may change. disabled test_vector tests. GH2853
intel issuing a dividend shold not make the pandas test suite fail.
1 parent 7bc6649 commit ed89690

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

pandas/io/tests/test_yahoo.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def test_get_components(self):
7474
@slow
7575
@network
7676
def test_get_data(self):
77+
import numpy as np
7778
#single symbol
7879
#http://finance.yahoo.com/q/hp?s=GOOG&a=09&b=08&c=2010&d=09&e=10&f=2010&g=d
7980
df = web.get_data_yahoo('GOOG')
@@ -82,6 +83,8 @@ def test_get_data(self):
8283
sl = ['AAPL', 'AMZN', 'GOOG']
8384
pan = web.get_data_yahoo(sl, '2012')
8485
ts = pan.Close.GOOG.index[pan.Close.AAPL > pan.Close.GOOG]
86+
# the provider results are subject to change, disabled. GH2847
87+
# assert result == expected
8588
assert ts[0].dayofyear == 96
8689

8790
dfi = web.get_components_yahoo('^DJI')
@@ -94,7 +97,13 @@ def test_get_data(self):
9497
adjust_price=True)
9598
expected = [18.38, 27.45, 24.54]
9699
result = pan.Close.ix['01-18-12'][['GE', 'MSFT', 'INTC']].tolist()
97-
assert result == expected
100+
# the provider results are subject to change, disabled. GH2847
101+
# assert result == expected
102+
103+
# sanity checking
104+
t= np.array(result)
105+
assert np.issubdtype(t.dtype, np.floating)
106+
assert t.shape == (3,)
98107

99108
pan = web.get_data_yahoo(dfi, '2011', ret_index=True)
100109
d = [[ 1.01757469, 1.01130524, 1.02414183],
@@ -104,7 +113,13 @@ def test_get_data(self):
104113

105114
expected = pd.DataFrame(d)
106115
result = pan.Ret_Index.ix['01-18-11':'01-21-11'][['GE', 'INTC', 'MSFT']]
107-
assert_almost_equal(result.values, expected.values)
116+
# the provider results are subject to change, disabled. GH2847
117+
# assert_almost_equal(result.values, expected.values)
118+
119+
# sanity checking
120+
t= np.array(result)
121+
assert np.issubdtype(t.dtype, np.floating)
122+
assert t.shape == (4, 3)
108123

109124

110125
if __name__ == '__main__':

0 commit comments

Comments
 (0)