diff --git a/AUTHORS.rst b/AUTHORS.rst index 5c0f9bb9882..5e4d75e988a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -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 diff --git a/CHANGES.rst b/CHANGES.rst index 76915e0fed6..5124dbb90e2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 ------- diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py index 2d01f935062..fe91c66143b 100644 --- a/sphinx/testing/path.py +++ b/sphinx/testing/path.py @@ -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,