Skip to content

Commit 4bc8baf

Browse files
rossbarmattgebert
andcommitted
TST: use path anchor instead of drive + root.
Co-authored-by: Matt Gebert <[email protected]>
1 parent d986798 commit 4bc8baf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

numpydoc/tests/hooks/test_utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ def test_find_project_root(tmp_path, request, reason_file, files, expected_reaso
2323
(tmp_path / reason_file).touch()
2424

2525
if files:
26-
if expected_reason == "file system root":
27-
expected_dir = Path(tmp_path.drive + tmp_path.root)
28-
else:
29-
expected_dir = tmp_path
26+
expected_dir = (
27+
Path(tmp_path.anchor) if expected_reason == "file system root" else tmp_path
28+
)
3029

3130
for file in files:
3231
(tmp_path / file).touch()

0 commit comments

Comments
 (0)