mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #9549 from tk0miya/9524_SphinxTestApp_outdir
Close #9524: test: SphinxTestApp can take ``builddir`` as an argument
This commit is contained in:
commit
9ed054279a
1
CHANGES
1
CHANGES
@ -19,6 +19,7 @@ Features added
|
|||||||
template variable ``sphinx_version_tuple``
|
template variable ``sphinx_version_tuple``
|
||||||
* #9445: py domain: ``:py:property:`` directive supports ``:classmethod:``
|
* #9445: py domain: ``:py:property:`` directive supports ``:classmethod:``
|
||||||
option to describe the class property
|
option to describe the class property
|
||||||
|
* #9524: test: SphinxTestApp can take ``builddir`` as an argument
|
||||||
* #9535: C and C++, support more fundamental types, including GNU extensions.
|
* #9535: C and C++, support more fundamental types, including GNU extensions.
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
|
@ -102,14 +102,17 @@ class SphinxTestApp(application.Sphinx):
|
|||||||
_status: StringIO = None
|
_status: StringIO = None
|
||||||
_warning: StringIO = None
|
_warning: StringIO = None
|
||||||
|
|
||||||
def __init__(self, buildername: str = 'html', srcdir: path = None, freshenv: bool = False,
|
def __init__(self, buildername: str = 'html', srcdir: path = None, builddir: path = None,
|
||||||
confoverrides: Dict = None, status: IO = None, warning: IO = None,
|
freshenv: bool = False, confoverrides: Dict = None, status: IO = None,
|
||||||
tags: List[str] = None, docutilsconf: str = None, parallel: int = 0) -> None:
|
warning: IO = None, tags: List[str] = None, docutilsconf: str = None,
|
||||||
|
parallel: int = 0) -> None:
|
||||||
|
|
||||||
if docutilsconf is not None:
|
if docutilsconf is not None:
|
||||||
(srcdir / 'docutils.conf').write_text(docutilsconf)
|
(srcdir / 'docutils.conf').write_text(docutilsconf)
|
||||||
|
|
||||||
builddir = srcdir / '_build'
|
if builddir is None:
|
||||||
|
builddir = srcdir / '_build'
|
||||||
|
|
||||||
confdir = srcdir
|
confdir = srcdir
|
||||||
outdir = builddir.joinpath(buildername)
|
outdir = builddir.joinpath(buildername)
|
||||||
outdir.makedirs(exist_ok=True)
|
outdir.makedirs(exist_ok=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user