@@ -159,12 +159,12 @@ def test_spam_with_types(self):
159
159
def test_spam_no_match (self ):
160
160
dfs = self .read_html (self .spam_data )
161
161
for df in dfs :
162
- tm .assert_isinstance (df , DataFrame )
162
+ tm .assertIsInstance (df , DataFrame )
163
163
164
164
def test_banklist_no_match (self ):
165
165
dfs = self .read_html (self .banklist_data , attrs = {'id' : 'table' })
166
166
for df in dfs :
167
- tm .assert_isinstance (df , DataFrame )
167
+ tm .assertIsInstance (df , DataFrame )
168
168
169
169
def test_spam_header (self ):
170
170
df = self .read_html (self .spam_data , '.*Water.*' , header = 1 )[0 ]
@@ -307,9 +307,9 @@ def test_file_url(self):
307
307
url = self .banklist_data
308
308
dfs = self .read_html (file_path_to_url (url ), 'First' ,
309
309
attrs = {'id' : 'table' })
310
- tm .assert_isinstance (dfs , list )
310
+ tm .assertIsInstance (dfs , list )
311
311
for df in dfs :
312
- tm .assert_isinstance (df , DataFrame )
312
+ tm .assertIsInstance (df , DataFrame )
313
313
314
314
@slow
315
315
def test_invalid_table_attrs (self ):
@@ -325,44 +325,44 @@ def _bank_data(self, *args, **kwargs):
325
325
@slow
326
326
def test_multiindex_header (self ):
327
327
df = self ._bank_data (header = [0 , 1 ])[0 ]
328
- tm .assert_isinstance (df .columns , MultiIndex )
328
+ tm .assertIsInstance (df .columns , MultiIndex )
329
329
330
330
@slow
331
331
def test_multiindex_index (self ):
332
332
df = self ._bank_data (index_col = [0 , 1 ])[0 ]
333
- tm .assert_isinstance (df .index , MultiIndex )
333
+ tm .assertIsInstance (df .index , MultiIndex )
334
334
335
335
@slow
336
336
def test_multiindex_header_index (self ):
337
337
df = self ._bank_data (header = [0 , 1 ], index_col = [0 , 1 ])[0 ]
338
- tm .assert_isinstance (df .columns , MultiIndex )
339
- tm .assert_isinstance (df .index , MultiIndex )
338
+ tm .assertIsInstance (df .columns , MultiIndex )
339
+ tm .assertIsInstance (df .index , MultiIndex )
340
340
341
341
@slow
342
342
def test_multiindex_header_skiprows_tuples (self ):
343
343
df = self ._bank_data (header = [0 , 1 ], skiprows = 1 , tupleize_cols = True )[0 ]
344
- tm .assert_isinstance (df .columns , Index )
344
+ tm .assertIsInstance (df .columns , Index )
345
345
346
346
@slow
347
347
def test_multiindex_header_skiprows (self ):
348
348
df = self ._bank_data (header = [0 , 1 ], skiprows = 1 )[0 ]
349
- tm .assert_isinstance (df .columns , MultiIndex )
349
+ tm .assertIsInstance (df .columns , MultiIndex )
350
350
351
351
@slow
352
352
def test_multiindex_header_index_skiprows (self ):
353
353
df = self ._bank_data (header = [0 , 1 ], index_col = [0 , 1 ], skiprows = 1 )[0 ]
354
- tm .assert_isinstance (df .index , MultiIndex )
355
- tm .assert_isinstance (df .columns , MultiIndex )
354
+ tm .assertIsInstance (df .index , MultiIndex )
355
+ tm .assertIsInstance (df .columns , MultiIndex )
356
356
357
357
@slow
358
358
def test_regex_idempotency (self ):
359
359
url = self .banklist_data
360
360
dfs = self .read_html (file_path_to_url (url ),
361
361
match = re .compile (re .compile ('Florida' )),
362
362
attrs = {'id' : 'table' })
363
- tm .assert_isinstance (dfs , list )
363
+ tm .assertIsInstance (dfs , list )
364
364
for df in dfs :
365
- tm .assert_isinstance (df , DataFrame )
365
+ tm .assertIsInstance (df , DataFrame )
366
366
367
367
def test_negative_skiprows (self ):
368
368
with tm .assertRaisesRegexp (ValueError ,
@@ -426,10 +426,10 @@ def test_empty_tables(self):
426
426
res1 = self .read_html (StringIO (data1 ))
427
427
res2 = self .read_html (StringIO (data2 ))
428
428
assert_framelist_equal (res1 , res2 )
429
-
429
+
430
430
def test_tfoot_read (self ):
431
431
"""
432
- Make sure that read_html reads tfoot, containing td or th.
432
+ Make sure that read_html reads tfoot, containing td or th.
433
433
Ignores empty tfoot
434
434
"""
435
435
data_template = '''<table>
@@ -452,10 +452,10 @@ def test_tfoot_read(self):
452
452
453
453
data1 = data_template .format (footer = "" )
454
454
data2 = data_template .format (footer = "<tr><td>footA</td><th>footB</th></tr>" )
455
-
455
+
456
456
d1 = {'A' : ['bodyA' ], 'B' : ['bodyB' ]}
457
457
d2 = {'A' : ['bodyA' , 'footA' ], 'B' : ['bodyB' , 'footB' ]}
458
-
458
+
459
459
tm .assert_frame_equal (self .read_html (data1 )[0 ], DataFrame (d1 ))
460
460
tm .assert_frame_equal (self .read_html (data2 )[0 ], DataFrame (d2 ))
461
461
@@ -721,8 +721,8 @@ def test_data_fail(self):
721
721
def test_works_on_valid_markup (self ):
722
722
filename = os .path .join (DATA_PATH , 'valid_markup.html' )
723
723
dfs = self .read_html (filename , index_col = 0 )
724
- tm .assert_isinstance (dfs , list )
725
- tm .assert_isinstance (dfs [0 ], DataFrame )
724
+ tm .assertIsInstance (dfs , list )
725
+ tm .assertIsInstance (dfs [0 ], DataFrame )
726
726
727
727
@slow
728
728
def test_fallback_success (self ):
0 commit comments