Skip to content

Commit

Permalink
Update test_basic_doc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Nov 6, 2023
1 parent d809a3d commit 105f52b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_basic_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def test_html_head_files(test_app):
html_path = str(Path(app.outdir, "index.html"))
root_tree = html_parser.parse(html_path)
script_nodes = root_tree.xpath("/html/head/script")
script_files = [x.attrib["src"] for x in script_nodes]
script_files = [x.attrib["src"].rsplit("?", 1)[0] for x in script_nodes]
assert script_files.count("_static/sphinx-needs/libs/html/datatables.min.js") == 1

link_nodes = root_tree.xpath("/html/head/link")
link_files = [x.attrib["href"] for x in link_nodes]
link_files = [x.attrib["href"].rsplit("?", 1)[0] for x in link_nodes]
assert link_files.count("_static/sphinx-needs/modern.css") == 1

# Checks if not \ (Backslash) is found as path of js/css files
Expand Down

0 comments on commit 105f52b

Please sign in to comment.