Skip to content

Commit 3a5904d

Browse files
author
Release Manager
committed
gh-40895: Use SAGE_DOC_SRC instead of relative path in docbuilder test These two `sage_docbuild` tests use a relative path, requiring `sage -t --all` to be run from a specific directory. This was never needed before, so perhaps it was unintended. URL: #40895 Reported by: Mauricio Collares Reviewer(s): Tobias Diez
2 parents f98985b + 3de32dc commit 3a5904d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sage_docbuild/builders.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,8 @@ def get_all_documents(source: Path) -> list[Path]:
11801180
EXAMPLES::
11811181
11821182
sage: from sage_docbuild.builders import get_all_documents
1183-
sage: documents = get_all_documents(Path('src/doc'))
1183+
sage: from sage.env import SAGE_DOC_SRC
1184+
sage: documents = get_all_documents(Path(SAGE_DOC_SRC))
11841185
sage: Path('en/tutorial') in documents
11851186
True
11861187
"""
@@ -1213,7 +1214,8 @@ def get_all_reference_documents(source: Path) -> list[Path]:
12131214
EXAMPLES::
12141215
12151216
sage: from sage_docbuild.builders import get_all_reference_documents
1216-
sage: documents = get_all_reference_documents(Path('src/doc/en'))
1217+
sage: from sage.env import SAGE_DOC_SRC
1218+
sage: documents = get_all_reference_documents(Path(SAGE_DOC_SRC) / 'en')
12171219
sage: Path('reference/algebras') in documents
12181220
True
12191221
"""

0 commit comments

Comments
 (0)