diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py index 80ca84cb3..c0dd1feac 100644 --- a/sphinx/testing/util.py +++ b/sphinx/testing/util.py @@ -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 diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 1efc6c14a..acb3ca764 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -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')