@@ -1294,22 +1294,14 @@ def test_extract_hrefs(self):
1294
1294
"""
1295
1295
<table>
1296
1296
<tr>
1297
- <th>Kingdom</th>
1298
- <th>Phylum</th>
1299
- <th>Class</th>
1300
- <th>Order</th>
1301
- <th>Family</th>
1302
- <th>Genus</th>
1303
- <th>Species</th>
1297
+ <th>HTTP</th>
1298
+ <th>FTP</th>
1299
+ <th><a href="https://en.wiktionary.org/wiki/linkless">None</a></th>
1304
1300
</tr>
1305
1301
<tr>
1306
- <td><a href="https://en.wikipedia.org/wiki/Animal">Animalia</a></td>
1307
- <td><a href="https://en.wikipedia.org/wiki/Chordate">Chordata</a></td>
1308
- <td><a href="https://en.wikipedia.org/wiki/Mammal">Mammalia</a></td>
1309
- <td><a href="https://en.wikipedia.org/wiki/Carnivora">Carnivora</a></td>
1310
- <td><a href="https://en.wikipedia.org/wiki/Bear">Ursidae</a></td>
1311
- <td><a href="https://en.wikipedia.org/wiki/Ailuropoda">Ailuropoda</a></td>
1312
- <td>A. melanoleuca</td>
1302
+ <td><a href="https://en.wikipedia.org/">Wikipedia</a></td>
1303
+ <td><a href="ftp://ftp.us.debian.org/">Debian</a></td>
1304
+ <td>Linkless</td>
1313
1305
</tr>
1314
1306
</table>
1315
1307
""" ,
@@ -1319,23 +1311,15 @@ def test_extract_hrefs(self):
1319
1311
expected = DataFrame (
1320
1312
[
1321
1313
[
1322
- ("Animalia" , "https://en.wikipedia.org/wiki/Animal" ),
1323
- ("Chordata" , "https://en.wikipedia.org/wiki/Chordate" ),
1324
- ("Mammalia" , "https://en.wikipedia.org/wiki/Mammal" ),
1325
- ("Carnivora" , "https://en.wikipedia.org/wiki/Carnivora" ),
1326
- ("Ursidae" , "https://en.wikipedia.org/wiki/Bear" ),
1327
- ("Ailuropoda" , "https://en.wikipedia.org/wiki/Ailuropoda" ),
1328
- ("A. melanoleuca" ,),
1314
+ ("Wikipedia" , "https://en.wikipedia.org/" ),
1315
+ ("Debian" , "ftp://ftp.us.debian.org/" ),
1316
+ ("Linkless" ,),
1329
1317
]
1330
1318
],
1331
1319
columns = (
1332
- "Kingdom" ,
1333
- "Phylum" ,
1334
- "Class" ,
1335
- "Order" ,
1336
- "Family" ,
1337
- "Genus" ,
1338
- "Species" ,
1320
+ "HTTP" ,
1321
+ "FTP" ,
1322
+ "None" ,
1339
1323
),
1340
1324
)
1341
1325
0 commit comments