[lint] run `mypy on test_application.py` (#12112)

This commit is contained in:
Bénédikt Tran 2024-03-16 18:29:44 +01:00 committed by GitHub
parent 2df5b0a8ab
commit b0ded2e624
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View File

@ -218,7 +218,6 @@ module = [
# tests/
# "tests.conftest",
"tests.test_addnodes",
"tests.test_application",
"tests.test_errors",
"tests.test_events",
"tests.test_highlighting",

View File

@ -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'