diff options
author | Martin Liška <mliska@suse.cz> | 2023-04-05 14:54:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 13:54:09 +0100 |
commit | fc4fead40d3fd86b28060425cee549b9db5a27bb (patch) | |
tree | e75709cf7570f0446f643e8d1f5396b372903339 /tests | |
parent | 8e26d78b79ea595a8c601d3b3caecf71341d396e (diff) | |
download | sphinx-git-fc4fead40d3fd86b28060425cee549b9db5a27bb.tar.gz |
Allow parallel execution of tests in ``test_search`` (#11292)
Add various ``app.builder.build_all()`` calls.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_directive_code.py | 2 | ||||
-rw-r--r-- | tests/test_search.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index 049bed326..1e368e045 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -456,7 +456,7 @@ def test_literalinclude_file_whole_of_emptyline(app, status, warning): @pytest.mark.sphinx('html', testroot='directive-code') def test_literalinclude_caption_html(app, status, warning): - app.builder.build('index') + app.builder.build_all() html = (app.outdir / 'caption.html').read_text(encoding='utf8') caption = ('<div class="code-block-caption">' '<span class="caption-number">Listing 2 </span>' diff --git a/tests/test_search.py b/tests/test_search.py index 663dd7148..3a20d5d90 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -110,6 +110,7 @@ def test_stemmer_does_not_remove_short_words(app): @pytest.mark.sphinx(testroot='search') def test_stemmer(app): + app.builder.build_all() searchindex = load_searchindex(app.outdir / 'searchindex.js') print(searchindex) assert is_registered_term(searchindex, 'findthisstemmedkei') @@ -118,6 +119,7 @@ def test_stemmer(app): @pytest.mark.sphinx(testroot='search') def test_term_in_heading_and_section(app): + app.builder.build_all() searchindex = (app.outdir / 'searchindex.js').read_text(encoding='utf8') # if search term is in the title of one doc and in the text of another # both documents should be a hit in the search index as a title, @@ -128,6 +130,7 @@ def test_term_in_heading_and_section(app): @pytest.mark.sphinx(testroot='search') def test_term_in_raw_directive(app): + app.builder.build_all() searchindex = load_searchindex(app.outdir / 'searchindex.js') assert not is_registered_term(searchindex, 'raw') assert is_registered_term(searchindex, 'rawword') |