@@ -136,33 +136,6 @@ def gh_13141_data(self):
136
136
</table>
137
137
"""
138
138
139
- @pytest .fixture
140
- def gh_13141_expected (self ):
141
- return {
142
- "head_ignore" : ["HTTP" , "FTP" , "Linkless" ],
143
- "head_extract" : [
144
- ("HTTP" , None ),
145
- ("FTP" , None ),
146
- ("Linkless" , "https://en.wiktionary.org/wiki/linkless" ),
147
- ],
148
- "body_ignore" : ["Wikipedia" , "SURROUNDING Debian TEXT" , "Linkless" ],
149
- "body_extract" : [
150
- ("Wikipedia" , "https://en.wikipedia.org/" ),
151
- ("SURROUNDING Debian TEXT" , "ftp://ftp.us.debian.org/" ),
152
- ("Linkless" , None ),
153
- ],
154
- "footer_ignore" : [
155
- "Footer" ,
156
- "Multiple links: Only first captured." ,
157
- None ,
158
- ],
159
- "footer_extract" : [
160
- ("Footer" , "https://en.wikipedia.org/wiki/Page_footer" ),
161
- ("Multiple links: Only first captured." , "1" ),
162
- None ,
163
- ],
164
- }
165
-
166
139
@pytest .fixture (autouse = True , scope = "function" )
167
140
def set_defaults (self , flavor ):
168
141
self .read_html = partial (read_html , flavor = flavor )
@@ -1394,7 +1367,32 @@ def test_parse_br_as_space(self):
1394
1367
tm .assert_frame_equal (result , expected )
1395
1368
1396
1369
@pytest .mark .parametrize ("arg" , ["all" , "body" , "header" , "footer" ])
1397
- def test_extract_links (self , gh_13141_data , gh_13141_expected , arg ):
1370
+ def test_extract_links (self , gh_13141_data , arg ):
1371
+ gh_13141_expected = {
1372
+ "head_ignore" : ["HTTP" , "FTP" , "Linkless" ],
1373
+ "head_extract" : [
1374
+ ("HTTP" , None ),
1375
+ ("FTP" , None ),
1376
+ ("Linkless" , "https://en.wiktionary.org/wiki/linkless" ),
1377
+ ],
1378
+ "body_ignore" : ["Wikipedia" , "SURROUNDING Debian TEXT" , "Linkless" ],
1379
+ "body_extract" : [
1380
+ ("Wikipedia" , "https://en.wikipedia.org/" ),
1381
+ ("SURROUNDING Debian TEXT" , "ftp://ftp.us.debian.org/" ),
1382
+ ("Linkless" , None ),
1383
+ ],
1384
+ "footer_ignore" : [
1385
+ "Footer" ,
1386
+ "Multiple links: Only first captured." ,
1387
+ None ,
1388
+ ],
1389
+ "footer_extract" : [
1390
+ ("Footer" , "https://en.wikipedia.org/wiki/Page_footer" ),
1391
+ ("Multiple links: Only first captured." , "1" ),
1392
+ None ,
1393
+ ],
1394
+ }
1395
+
1398
1396
data_exp = gh_13141_expected ["body_ignore" ]
1399
1397
foot_exp = gh_13141_expected ["footer_ignore" ]
1400
1398
head_exp = gh_13141_expected ["head_ignore" ]
0 commit comments