diff --git a/pyproject.toml b/pyproject.toml index 50cd52b3b..86e5e895e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -218,7 +218,6 @@ module = [ # tests/ # "tests.conftest", "tests.test_addnodes", - "tests.test_application", "tests.test_errors", "tests.test_events", "tests.test_highlighting", diff --git a/tests/test_application.py b/tests/test_application.py index a0fe268fe..e39998663 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -1,9 +1,11 @@ """Test the Sphinx class.""" +from __future__ import annotations import shutil import sys from io import StringIO from pathlib import Path +from typing import TYPE_CHECKING from unittest.mock import Mock import pytest @@ -14,8 +16,15 @@ from sphinx.errors import ExtensionError from sphinx.testing.util import SphinxTestApp, strip_escseq from sphinx.util import logging +if TYPE_CHECKING: + import os -def test_instantiation(tmp_path_factory, rootdir: str, monkeypatch): + +def test_instantiation( + tmp_path_factory: pytest.TempPathFactory, + rootdir: str | os.PathLike[str] | None, + monkeypatch: pytest.MonkeyPatch, +) -> None: # Given src_dir = tmp_path_factory.getbasetemp() / 'root'