Skip to content
Snippets Groups Projects
Commit 701a6776 authored by Fraser William Goldsworth's avatar Fraser William Goldsworth
Browse files

a test to ensure the docs are building

parent d8146433
No related branches found
No related tags found
No related merge requests found
import subprocess
import pytest
import pyicon as pyic
from pathlib import Path
def test_docs_build(tmpdir_factory):
base_dir = Path(pyic.__file__).parent / ".."
doc_dir = base_dir.resolve() / "doc"
build_dir = tmpdir_factory.mktemp("_build")
# Run the sphinx-build command
try:
subprocess.check_call(
["sphinx-build", "-b", "html", doc_dir, build_dir])
except subprocess.CalledProcessError as e:
pytest.fail(
f"Documentation build failed with exit code {e.returncode}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment