File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 22
33import pytest
44
5+ import sphinx
6+
57pytest_plugins = 'sphinx.testing.fixtures'
68
79
810@pytest .fixture (scope = 'session' )
911def rootdir ():
12+ if sphinx .version_info [:2 ] < (7 , 2 ):
13+ from sphinx .testing .path import path
14+
15+ return path (__file__ ).parent .abspath () / 'roots'
16+
1017 return Path (__file__ ).resolve ().parent / 'roots'
Original file line number Diff line number Diff line change 11"""Test the HTML Help builder and check output against XPath."""
22
33import re
4+ from pathlib import Path
45
56import pytest
67from html5lib import HTMLParser
@@ -55,7 +56,7 @@ def test_chm(app):
5556
5657 # check .hhk file
5758 outname = app .builder .config .htmlhelp_basename
58- hhk_path = (app .outdir / outname ).with_suffix ('.hhk' )
59+ hhk_path = Path (app .outdir / outname ).with_suffix ('.hhk' )
5960 data = hhk_path .read_bytes ()
6061 m = re .search (br'&#[xX][0-9a-fA-F]+;' , data )
6162 assert m is None , 'Hex escaping exists in .hhk file: ' + str (m .group (0 ))
You can’t perform that action at this time.
0 commit comments