mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[lint] run `mypy
on
test_application.py
` (#12112)
This commit is contained in:
parent
2df5b0a8ab
commit
b0ded2e624
@ -218,7 +218,6 @@ module = [
|
|||||||
# tests/
|
# tests/
|
||||||
# "tests.conftest",
|
# "tests.conftest",
|
||||||
"tests.test_addnodes",
|
"tests.test_addnodes",
|
||||||
"tests.test_application",
|
|
||||||
"tests.test_errors",
|
"tests.test_errors",
|
||||||
"tests.test_events",
|
"tests.test_events",
|
||||||
"tests.test_highlighting",
|
"tests.test_highlighting",
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
"""Test the Sphinx class."""
|
"""Test the Sphinx class."""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -14,8 +16,15 @@ from sphinx.errors import ExtensionError
|
|||||||
from sphinx.testing.util import SphinxTestApp, strip_escseq
|
from sphinx.testing.util import SphinxTestApp, strip_escseq
|
||||||
from sphinx.util import logging
|
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
|
# Given
|
||||||
src_dir = tmp_path_factory.getbasetemp() / 'root'
|
src_dir = tmp_path_factory.getbasetemp() / 'root'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user