Skip to content

Commit 7e1bf28

Browse files
attakeiAA-Turner
andauthored
Restore support for sphinx.testing.path paths in sphinx.testing.fixtures (#13378)
Co-authored-by: Adam Turner <[email protected]>
1 parent d099161 commit 7e1bf28

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Contributors
7474
* Juan Luis Cano Rodríguez -- new tutorial (2021)
7575
* Julien Palard -- Colspan and rowspan in text builder
7676
* Justus Magin -- napoleon improvements
77+
* Kazuya Take -- ``sphinx.testing.path`` bug fix
7778
* Kevin Dunn -- MathJax extension
7879
* KINEBUCHI Tomohiko -- typing Sphinx as well as docutils
7980
* Kurt McKee -- documentation updates

CHANGES.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Features added
1616
Bugs fixed
1717
----------
1818

19+
* #13377: Restore support for using ``sphinx.testing.path`` paths with
20+
``sphinx.testing.fixtures``.
21+
Patch by Kazuya Takei.
22+
1923
Testing
2024
-------
2125

sphinx/testing/path.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,26 @@ def isdir(self) -> bool:
5858
"""Returns ``True`` if the path is a directory."""
5959
return os.path.isdir(self)
6060

61+
is_dir = isdir
62+
6163
def isfile(self) -> bool:
6264
"""Returns ``True`` if the path is a file."""
6365
return os.path.isfile(self)
6466

67+
is_file = isfile
68+
6569
def islink(self) -> bool:
6670
"""Returns ``True`` if the path is a symbolic link."""
6771
return os.path.islink(self)
6872

73+
is_symlink = islink
74+
6975
def ismount(self) -> bool:
7076
"""Returns ``True`` if the path is a mount point."""
7177
return os.path.ismount(self)
7278

79+
is_mount = ismount
80+
7381
def rmtree(
7482
self,
7583
ignore_errors: bool = False,

0 commit comments

Comments
 (0)