@@ -37,19 +37,19 @@ def test_basic(
3737 warnings = warning .getvalue ().strip ()
3838 assert warnings == ""
3939
40- get_sphinx_app_doctree (
41- app ,
42- docname = "content" ,
43- regress = True ,
44- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .xml" ,
45- )
46- get_sphinx_app_doctree (
47- app ,
48- docname = "content" ,
49- resolve = True ,
50- regress = True ,
51- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .xml" ,
52- )
40+ try :
41+ get_sphinx_app_doctree (
42+ app ,
43+ docname = "content" ,
44+ regress = True ,
45+ )
46+ finally :
47+ get_sphinx_app_doctree (
48+ app ,
49+ docname = "content" ,
50+ resolve = True ,
51+ regress = True ,
52+ )
5353 get_sphinx_app_output (
5454 app ,
5555 filename = "content.html" ,
@@ -104,7 +104,7 @@ def test_references(
104104 app ,
105105 filename = "index.html" ,
106106 regress_html = True ,
107- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .html" ,
107+ replace = { "Permalink to this headline" : "Permalink to this heading" } ,
108108 )
109109
110110
@@ -154,7 +154,7 @@ def test_references_singlehtml(
154154 filename = "index.html" ,
155155 buildername = "singlehtml" ,
156156 regress_html = True ,
157- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .html" ,
157+ replace = { "Permalink to this headline" : "Permalink to this heading" } ,
158158 )
159159
160160
@@ -185,7 +185,7 @@ def test_heading_slug_func(
185185 app ,
186186 filename = "index.html" ,
187187 regress_html = True ,
188- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .html" ,
188+ replace = { "Permalink to this headline" : "Permalink to this heading" } ,
189189 )
190190
191191
@@ -216,14 +216,13 @@ def test_extended_syntaxes(
216216 app ,
217217 docname = "index" ,
218218 regress = True ,
219- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .xml" ,
220219 )
221220 finally :
222221 get_sphinx_app_output (
223222 app ,
224223 filename = "index.html" ,
225224 regress_html = True ,
226- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .html" ,
225+ replace = { "Permalink to this headline" : "Permalink to this heading" } ,
227226 )
228227
229228
@@ -249,7 +248,6 @@ def test_includes(
249248 app ,
250249 docname = "index" ,
251250 regress = True ,
252- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .xml" ,
253251 # fix for Windows CI
254252 replace = {
255253 r"subfolder\example2.jpg" : "subfolder/example2.jpg" ,
@@ -262,8 +260,8 @@ def test_includes(
262260 app ,
263261 filename = "index.html" ,
264262 regress_html = True ,
265- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .html" ,
266263 replace = {
264+ "Permalink to this headline" : "Permalink to this heading" ,
267265 r"'subfolder\\example2'" : "'subfolder/example2'" ,
268266 r'uri="subfolder\\example2"' : 'uri="subfolder/example2"' ,
269267 "_images/example21.jpg" : "_images/example2.jpg" ,
@@ -354,7 +352,7 @@ def test_commonmark_only(
354352 app ,
355353 filename = "index.html" ,
356354 regress_html = True ,
357- regress_ext = f".sphinx { sphinx . version_info [ 0 ] } .html" ,
355+ replace = { "Permalink to this headline" : "Permalink to this heading" } ,
358356 )
359357
360358
@@ -407,7 +405,7 @@ def test_gettext(
407405 output = re .sub (r"POT-Creation-Date: [0-9: +-]+" , "POT-Creation-Date: " , output )
408406 output = re .sub (r"Copyright \(C\) [0-9]{4}" , "Copyright (C) XXXX" , output )
409407
410- file_regression .check (output , extension = f".sphinx { sphinx . version_info [ 0 ] } .pot" )
408+ file_regression .check (output , extension = " .pot" )
411409
412410
413411@pytest .mark .sphinx (
@@ -434,15 +432,13 @@ def test_gettext_html(
434432 app ,
435433 docname = "index" ,
436434 regress = True ,
437- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .xml" ,
438435 )
439436 finally :
440437 get_sphinx_app_doctree (
441438 app ,
442439 docname = "index" ,
443440 resolve = True ,
444441 regress = True ,
445- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .xml" ,
446442 )
447443 get_sphinx_app_output (
448444 app ,
@@ -483,7 +479,7 @@ def test_gettext_additional_targets(
483479 output = re .sub (r"POT-Creation-Date: [0-9: +-]+" , "POT-Creation-Date: " , output )
484480 output = re .sub (r"Copyright \(C\) [0-9]{4}" , "Copyright (C) XXXX" , output )
485481
486- file_regression .check (output , extension = f".sphinx { sphinx . version_info [ 0 ] } .pot" )
482+ file_regression .check (output , extension = " .pot" )
487483
488484
489485@pytest .mark .sphinx (
@@ -530,7 +526,6 @@ def test_fieldlist_extension(
530526 app ,
531527 docname = "index" ,
532528 regress = True ,
533- regress_ext = f".sphinx{ sphinx .version_info [0 ]} .xml" ,
534529 # changed in:
535530 # https://www.sphinx-doc.org/en/master/changes.html#release-4-4-0-released-jan-17-2022
536531 replace = {
0 commit comments