diff --git a/pandas_datareader/tests/yahoo/test_yahoo.py b/pandas_datareader/tests/yahoo/test_yahoo.py index 22bfe48c..d579d38c 100644 --- a/pandas_datareader/tests/yahoo/test_yahoo.py +++ b/pandas_datareader/tests/yahoo/test_yahoo.py @@ -104,17 +104,17 @@ def test_get_data_adjust_price(self): assert 'Adj Close' not in goog_adj.columns assert (goog['Open'] * goog_adj['Adj_Ratio']).equals(goog_adj['Open']) - @pytest.mark.xfail(reason="failing after #355") + @skip_on_exception(RemoteDataError) def test_get_data_interval(self): # daily interval data pan = web.get_data_yahoo('XOM', '2013-01-01', '2013-12-31', interval='d') - assert len(pan) == 251 + assert len(pan) == 252 # weekly interval data pan = web.get_data_yahoo('XOM', '2013-01-01', '2013-12-31', interval='w') - assert len(pan) == 52 + assert len(pan) == 53 # monthly interval data pan = web.get_data_yahoo('XOM', '2012-12-31', diff --git a/pandas_datareader/yahoo/daily.py b/pandas_datareader/yahoo/daily.py index 78777e73..87de2e52 100644 --- a/pandas_datareader/yahoo/daily.py +++ b/pandas_datareader/yahoo/daily.py @@ -97,7 +97,8 @@ def yurl(symbol): def _get_params(self, symbol): unix_start = int(time.mktime(self.start.timetuple())) - unix_end = int(time.mktime(self.end.timetuple())) + day_end = self.end.replace(hour=23, minute=59, second=59) + unix_end = int(time.mktime(day_end.timetuple())) params = { 'period1': unix_start,