From f5847b67d07dbb20898d16f08d69eaef11fe6f73 Mon Sep 17 00:00:00 2001 From: nikkie Date: Mon, 12 Aug 2024 01:33:33 +0900 Subject: [PATCH 1/2] tweak: rootdir expects pathlib.Path --- sphinx/testing/fixtures.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py index 388e5f6e3cc..9919bc4f4cb 100644 --- a/sphinx/testing/fixtures.py +++ b/sphinx/testing/fixtures.py @@ -7,6 +7,7 @@ import sys from collections import namedtuple from io import StringIO +from pathlib import Path from typing import TYPE_CHECKING import pytest @@ -42,7 +43,7 @@ def pytest_configure(config: pytest.Config) -> None: @pytest.fixture(scope='session') -def rootdir() -> str | None: +def rootdir() -> Path | None: return None @@ -74,7 +75,7 @@ def app_params( test_params: dict[str, Any], shared_result: SharedResult, sphinx_test_tempdir: str, - rootdir: str, + rootdir: Path, ) -> _app_params: """ Parameters that are specified by 'pytest.mark.sphinx' for From b82dcb9b02c4afb5c3d3ddbc0fa99f3eb2fea9a0 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Sun, 11 Aug 2024 17:43:31 +0100 Subject: [PATCH 2/2] Update sphinx/testing/fixtures.py --- sphinx/testing/fixtures.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sphinx/testing/fixtures.py b/sphinx/testing/fixtures.py index 9919bc4f4cb..7e7811e8907 100644 --- a/sphinx/testing/fixtures.py +++ b/sphinx/testing/fixtures.py @@ -7,7 +7,6 @@ import sys from collections import namedtuple from io import StringIO -from pathlib import Path from typing import TYPE_CHECKING import pytest