Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx.testing.fixtures still also works when type of rootdir is sphinx.testing.path #13378

Merged
merged 6 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Contributors
* Juan Luis Cano Rodríguez -- new tutorial (2021)
* Julien Palard -- Colspan and rowspan in text builder
* Justus Magin -- napoleon improvements
* Kazuya Take -- ``sphinx.testing.path`` bug fix
* Kevin Dunn -- MathJax extension
* KINEBUCHI Tomohiko -- typing Sphinx as well as docutils
* Kurt McKee -- documentation updates
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Features added
Bugs fixed
----------

* #13377: Restore support for using ``sphinx.testing.path`` paths with
``sphinx.testing.fixtures``.
Patch by Kazuya Takei.

Testing
-------

Expand Down
8 changes: 8 additions & 0 deletions sphinx/testing/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,26 @@ def isdir(self) -> bool:
"""Returns ``True`` if the path is a directory."""
return os.path.isdir(self)

is_dir = isdir

def isfile(self) -> bool:
"""Returns ``True`` if the path is a file."""
return os.path.isfile(self)

is_file = isfile

def islink(self) -> bool:
"""Returns ``True`` if the path is a symbolic link."""
return os.path.islink(self)

is_symlink = islink

def ismount(self) -> bool:
"""Returns ``True`` if the path is a mount point."""
return os.path.ismount(self)

is_mount = ismount

def rmtree(
self,
ignore_errors: bool = False,
Expand Down