Skip to content

Commit b33dc9e

Browse files
committed
Simplify tests
1 parent ac86888 commit b33dc9e

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

pandas/tests/io/test_html.py

+12-28
Original file line numberDiff line numberDiff line change
@@ -1294,22 +1294,14 @@ def test_extract_hrefs(self):
12941294
"""
12951295
<table>
12961296
<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>
13041300
</tr>
13051301
<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>
13131305
</tr>
13141306
</table>
13151307
""",
@@ -1319,23 +1311,15 @@ def test_extract_hrefs(self):
13191311
expected = DataFrame(
13201312
[
13211313
[
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",),
13291317
]
13301318
],
13311319
columns=(
1332-
"Kingdom",
1333-
"Phylum",
1334-
"Class",
1335-
"Order",
1336-
"Family",
1337-
"Genus",
1338-
"Species",
1320+
"HTTP",
1321+
"FTP",
1322+
"None",
13391323
),
13401324
)
13411325

0 commit comments

Comments
 (0)