@@ -319,6 +319,22 @@ def test_yahoo_reader_class(self):
319319 r = YahooDailyReader ('GOOG' , session = session )
320320 self .assertTrue (r .session is session )
321321
322+ def test_yahoo_DataReader (self ):
323+ start = datetime (2010 , 1 , 1 )
324+ end = datetime (2015 , 5 , 9 )
325+ result = web .DataReader ('AAPL' , 'yahoo-actions' , start , end )
326+
327+ exp_idx = pd .DatetimeIndex (['2015-05-07' , '2015-02-05' , '2014-11-06' , '2014-08-07' ,
328+ '2014-06-09' , '2014-05-08' , '2014-02-06' , '2013-11-06' ,
329+ '2013-08-08' , '2013-05-09' , '2013-02-07' , '2012-11-07' ,
330+ '2012-08-09' ])
331+ exp = pd .DataFrame ({'action' : ['DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' ,
332+ 'SPLIT' , 'DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' ,
333+ 'DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' , 'DIVIDEND' ],
334+ 'value' : [ 0.52 , 0.47 , 0.47 , 0.47 , 0.14285714 , 0.47 , 0.43571 , 0.43571 ,
335+ 0.43571 , 0.43571 , 0.37857 , 0.37857 , 0.37857 ]}, index = exp_idx )
336+ tm .assert_frame_equal (result , exp )
337+
322338
323339class TestYahooOptions (tm .TestCase ):
324340 @classmethod
0 commit comments