Skip to content

TST: better testing for io/data #10731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pandas/io/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,11 @@ def setUpClass(cls):

# aapl has monthlies
cls.aapl = web.Options('aapl', 'yahoo')
today = datetime.today()
cls.year = today.year
cls.month = today.month + 1
if cls.month > 12:
cls.year = cls.year + 1
cls.month = 1
cls.expiry = datetime(cls.year, cls.month, 1)
d = (Timestamp.today() + pd.offsets.MonthBegin(1)).normalize()
cls.year = d.year
cls.month = d.month
cls.expiry = d
cls.expiry2 = d + pd.offsets.MonthBegin(1)
cls.dirpath = tm.get_data_path()
cls.html1 = os.path.join(cls.dirpath, 'yahoo_options1.html')
cls.html2 = os.path.join(cls.dirpath, 'yahoo_options2.html')
Expand Down Expand Up @@ -325,7 +323,7 @@ def test_get_options_data(self):
def test_get_near_stock_price(self):
try:
options = self.aapl.get_near_stock_price(call=True, put=True,
expiry=self.expiry)
expiry=[self.expiry,self.expiry2])
except RemoteDataError as e:
raise nose.SkipTest(e)
self.assertTrue(len(options) > 1)
Expand Down