From f25a36d0563b1beda3d2bad76e1b10dac4471512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Li=C5=A1ka?= Date: Thu, 6 Apr 2023 23:33:20 +0200 Subject: [PATCH] Fix instability in ``test_build_epub`` (#11296) Some tests need ``app.builder.build_all`` in order to have complete rebuild. --- tests/test_build_epub.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_build_epub.py b/tests/test_build_epub.py index 19c2742a1..362ae4d6a 100644 --- a/tests/test_build_epub.py +++ b/tests/test_build_epub.py @@ -60,7 +60,7 @@ class EPUBElementTree: @pytest.mark.sphinx('epub', testroot='basic') def test_build_epub(app): - app.build() + app.builder.build_all() assert (app.outdir / 'mimetype').read_text(encoding='utf8') == 'application/epub+zip' assert (app.outdir / 'META-INF' / 'container.xml').exists() @@ -277,7 +277,7 @@ def test_escaped_toc(app): @pytest.mark.sphinx('epub', testroot='basic') def test_epub_writing_mode(app): # horizontal (default) - app.build() + app.builder.build_all() # horizontal / page-progression-direction opf = EPUBElementTree.fromstring((app.outdir / 'content.opf').read_text(encoding='utf8')) @@ -367,7 +367,7 @@ def test_html_download_role(app, status, warning): @pytest.mark.sphinx('epub', testroot='toctree-duplicated') def test_duplicated_toctree_entry(app, status, warning): - app.build() + app.builder.build_all() assert 'WARNING: duplicated ToC entry found: foo.xhtml' in warning.getvalue()