@@ -74,6 +74,7 @@ def test_get_components(self):
74
74
@slow
75
75
@network
76
76
def test_get_data (self ):
77
+ import numpy as np
77
78
#single symbol
78
79
#http://finance.yahoo.com/q/hp?s=GOOG&a=09&b=08&c=2010&d=09&e=10&f=2010&g=d
79
80
df = web .get_data_yahoo ('GOOG' )
@@ -82,6 +83,8 @@ def test_get_data(self):
82
83
sl = ['AAPL' , 'AMZN' , 'GOOG' ]
83
84
pan = web .get_data_yahoo (sl , '2012' )
84
85
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
85
88
assert ts [0 ].dayofyear == 96
86
89
87
90
dfi = web .get_components_yahoo ('^DJI' )
@@ -94,7 +97,13 @@ def test_get_data(self):
94
97
adjust_price = True )
95
98
expected = [18.38 , 27.45 , 24.54 ]
96
99
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 ,)
98
107
99
108
pan = web .get_data_yahoo (dfi , '2011' , ret_index = True )
100
109
d = [[ 1.01757469 , 1.01130524 , 1.02414183 ],
@@ -104,7 +113,13 @@ def test_get_data(self):
104
113
105
114
expected = pd .DataFrame (d )
106
115
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 )
108
123
109
124
110
125
if __name__ == '__main__' :
0 commit comments