Skip to content

Commit 2415207

Browse files
committed
tests: Fix path issue on annoying operating system
1 parent 6c5b5c3 commit 2415207

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_handler.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44

55
import os
66
from glob import glob
7+
from pathlib import Path
78
from textwrap import dedent
8-
from typing import TYPE_CHECKING
99

1010
import pytest
1111
from griffe import DocstringSectionExamples, DocstringSectionKind, temporary_visited_module
1212

1313
from mkdocstrings_handlers.python.handler import CollectionError, PythonHandler, get_handler
1414

15-
if TYPE_CHECKING:
16-
from pathlib import Path
17-
1815

1916
def test_collect_missing_module() -> None:
2017
"""Assert error is raised for missing modules."""
@@ -141,7 +138,7 @@ def test_extension_paths(tmp_path: Path, expect_change: bool, extension: str | d
141138
assert normalized == str(tmp_path.joinpath(extension))
142139
elif isinstance(normalized, dict) and isinstance(extension, dict):
143140
pth, options = next(iter(extension.items()))
144-
assert normalized == {str(tmp_path.joinpath(pth)): options}
141+
assert normalized == {str(Path(tmp_path, pth)): options}
145142
else:
146143
raise ValueError("Normalization must not change extension items type")
147144
else:

0 commit comments

Comments
 (0)