Skip to content

Commit 8c7a3f8

Browse files
committed
Fix path operations in tests
1 parent 1683f50 commit 8c7a3f8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_htmlhelp.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,8 @@ def test_chm(app):
6363

6464
# check .hhk file
6565
outname = app.builder.config.htmlhelp_basename
66-
hhk_path = str(app.outdir / outname + '.hhk')
67-
68-
with open(hhk_path, 'rb') as f:
69-
data = f.read()
66+
hhk_path = (app.outdir / outname).with_suffix('.hhk')
67+
data = hhk_path.read_bytes()
7068
m = re.search(br'&#[xX][0-9a-fA-F]+;', data)
7169
assert m is None, 'Hex escaping exists in .hhk file: ' + str(m.group(0))
7270

0 commit comments

Comments
 (0)