mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
add parallel to SphinxTestApp
This commit is contained in:
parent
d8c006f1c0
commit
c08214fe92
@ -108,7 +108,7 @@ class SphinxTestApp(application.Sphinx):
|
||||
|
||||
def __init__(self, buildername: str = 'html', srcdir: path = None, freshenv: bool = False,
|
||||
confoverrides: Dict = None, status: IO = None, warning: IO = None,
|
||||
tags: List[str] = None, docutilsconf: str = None) -> None:
|
||||
tags: List[str] = None, docutilsconf: str = None, parallel: int = 0) -> None:
|
||||
|
||||
if docutilsconf is not None:
|
||||
(srcdir / 'docutils.conf').write_text(docutilsconf)
|
||||
@ -133,7 +133,7 @@ class SphinxTestApp(application.Sphinx):
|
||||
try:
|
||||
super().__init__(srcdir, confdir, outdir, doctreedir,
|
||||
buildername, confoverrides, status, warning,
|
||||
freshenv, warningiserror, tags)
|
||||
freshenv, warningiserror, tags, parallel=parallel)
|
||||
except Exception:
|
||||
self.cleanup()
|
||||
raise
|
||||
|
@ -421,6 +421,12 @@ def test_html5_output(app, cached_etree_parse, fname, expect):
|
||||
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
|
||||
|
||||
|
||||
@pytest.mark.skipif(docutils.__version_info__ < (0, 13),
|
||||
reason='docutils-0.13 or above is required')
|
||||
@pytest.mark.sphinx('html', parallel=2)
|
||||
def test_html_parallel(app):
|
||||
app.build()
|
||||
|
||||
@pytest.mark.skipif(docutils.__version_info__ < (0, 13),
|
||||
reason='docutils-0.13 or above is required')
|
||||
@pytest.mark.sphinx('html')
|
||||
|
Loading…
Reference in New Issue
Block a user