Coverage for tests / conftest.py: 90%
10 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-26 08:41 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-04-26 08:41 +0000
1"""Pytest configuration file."""
3from __future__ import annotations
5from pathlib import Path
7import pytest
9pytest_plugins = ["sphinx.testing.fixtures"]
11# Exclude 'roots' dirs for pytest test collector
12collect_ignore: list[str] = ["roots"]
15def pytest_configure(config: pytest.Config) -> None:
16 """Add configurations for pytest."""
17 config.addinivalue_line("markers", "sphinx(builder, testroot='name'): Run sphinx on a site")
20@pytest.fixture(scope="session")
21def rootdir() -> Path:
22 """Directory containing Sphinx projects for testing."""
23 return Path(__file__).parent.absolute() / "roots"