Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions sphinx_remove_toctrees/tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path
from shutil import copytree

import sphinx
from bs4 import BeautifulSoup
from sphinx.testing.path import path as sphinx_path
from sphinx.testing.util import SphinxTestApp
Expand All @@ -13,8 +14,11 @@

def test_build_html(make_app, tmp_path):
"""Test building the base html template and config."""
copytree(path_test_doc, tmp_path / "test_doc")
app = make_app(srcdir=sphinx_path(tmp_path / "test_doc"))
srcdir = tmp_path / "test_doc"
copytree(path_test_doc, srcdir)
if sphinx.version_info < (7, 2):
srcdir = sphinx_path(srcdir)
app = make_app(srcdir=srcdir)
app.build()
index = tmp_path / "test_doc" / "_build" / "html" / "index.html"
assert index.exists()
Expand Down