summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Cohn <robert.s.cohn@intel.com>2020-09-30 20:47:56 -0400
committerRobert Cohn <robert.s.cohn@intel.com>2020-09-30 20:47:56 -0400
commitc08214fe92c8ab61219ce46af0ff634a57b8431c (patch)
treecd82eb255d5e1cd83b21a0df1e635fa2c7fedf24
parentd8c006f1c0e612d0dc595ae463b8e4c3ebee5ca4 (diff)
downloadsphinx-git-c08214fe92c8ab61219ce46af0ff634a57b8431c.tar.gz
add parallel to SphinxTestApp
-rw-r--r--sphinx/testing/util.py4
-rw-r--r--tests/test_build_html.py6
2 files changed, 8 insertions, 2 deletions
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
@@ -423,6 +423,12 @@ def test_html5_output(app, cached_etree_parse, 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')
@pytest.mark.test_params(shared_result='test_build_html_output')
def test_html_download(app):