File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323@pytest .mark .parametrize (
2424 "rst_file" ,
25- [ r . name for r in Path ("tests/data" ).glob ("*.rst" )] ,
25+ Path ("tests/data" ).glob ("*.rst" ),
2626)
27- def test_summarize_html (rst_file : str ) -> None :
28- rst = ( PROJECT / "tests/data" / rst_file ) .read_text (encoding = "utf-8" )
29- root = rst_file .removesuffix (".rst" )
27+ def test_summarize_html (rst_file : Path ) -> None :
28+ rst = rst_file .read_text (encoding = "utf-8" )
29+ root = rst_file .name . removesuffix (".rst" )
3030 with in_tempdir ():
3131 doctree = run_sphinx (rst , buildername = "html" , extensions = ["linklint.ext" ])
3232 summary = summarize_html_file ("_build/index.html" )
@@ -46,7 +46,7 @@ def test_summarize_html(rst_file: str) -> None:
4646 save_test_doctree (doctree )
4747
4848 assert 'class="self-link"' not in summary , f"Self-links found in { root } .html"
49- summary_file = PROJECT / f"tests/data/{ root } _summary.html"
49+ summary_file = Path ( f"tests/data/{ root } _summary.html" )
5050 if summary_file .exists ():
5151 expected = summary_file .read_text (encoding = "utf-8" )
5252 else :
You can’t perform that action at this time.
0 commit comments