@@ -280,6 +280,7 @@ def setUpClass(cls):
280
280
cls .dirpath = tm .get_data_path ()
281
281
cls .html1 = os .path .join (cls .dirpath , 'yahoo_options1.html' )
282
282
cls .html2 = os .path .join (cls .dirpath , 'yahoo_options2.html' )
283
+ cls .html3 = os .path .join (cls .dirpath , 'yahoo_options3.html' ) #Empty table GH#22
283
284
cls .data1 = cls .aapl ._option_frames_from_url (cls .html1 )['puts' ]
284
285
285
286
@classmethod
@@ -398,6 +399,11 @@ def test_month_year(self):
398
399
399
400
self .assertTrue (len (data ) > 1 )
400
401
402
+ def test_empty_table (self ):
403
+ #GH22
404
+ empty = self .aapl ._option_frames_from_url (self .html3 )['puts' ]
405
+ self .assertTrue (len (empty ) == 0 )
406
+
401
407
402
408
class TestOptionsWarnings (tm .TestCase ):
403
409
@classmethod
@@ -410,7 +416,7 @@ def tearDownClass(cls):
410
416
411
417
def test_options_source_warning (self ):
412
418
if not assert_produces_warning :
413
- raise SkipTest ("old version of pandas without "
419
+ raise nose . SkipTest ("old version of pandas without "
414
420
"compat.assert_produces_warning" )
415
421
with assert_produces_warning ():
416
422
aapl = web .Options ('aapl' )
@@ -426,6 +432,7 @@ def test_read_yahoo(self):
426
432
assert isinstance (gs , DataFrame )
427
433
428
434
def test_read_google (self ):
435
+ raise nose .SkipTest ("Google API deprecated" )
429
436
gs = DataReader ("GS" , "google" )
430
437
assert isinstance (gs , DataFrame )
431
438
0 commit comments