From: Dmitry Shachnev Date: Sat, 30 Nov 2024 18:57:43 +0300 Subject: Make the tests pass with Sphinx 8.1 See https://github.com/sphinx-doc/sphinx/pull/12776 which changed the default theme from alabaster to basic and broke the tests. Forwarded: https://github.com/readthedocs/sphinx-notfound-page/pull/250 --- tests/test_urls.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_urls.py b/tests/test_urls.py index d5a10a5..8f85b66 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -52,7 +52,7 @@ def test_404_page_not_created(app, status, warning): path = app.outdir / '404.html' assert not path.exists() -@pytest.mark.sphinx(srcdir=srcdir) +@pytest.mark.sphinx(srcdir=srcdir, confoverrides={'html_theme': 'alabaster'}) def test_default_settings(app, status, warning): app.build() path = app.outdir / '404.html' @@ -130,6 +130,7 @@ def test_pagename_setting(app, status, warning): srcdir=srcdir, confoverrides={ 'notfound_urls_prefix': '/language/version/', + 'html_theme': 'alabaster', }, ) def test_urls_prefix_setting(app, status, warning): @@ -173,6 +174,7 @@ def test_urls_prefix_setting(app, status, warning): srcdir=srcdir, confoverrides={ 'notfound_urls_prefix': None, + 'html_theme': 'alabaster', }, ) def test_urls_prefix_setting_none(app, status, warning): @@ -248,6 +250,7 @@ def test_template_setting(app, status, warning): srcdir=rstsrcdir, confoverrides={ 'version': '2.5.1', + 'html_theme': 'alabaster', }, ) def test_custom_404_rst_source(app, status, warning): @@ -359,6 +362,7 @@ def test_image_absolute_url(app, status, warning): @pytest.mark.sphinx( srcdir=srcdir, buildername='dirhtml', + confoverrides={'html_theme': 'alabaster'}, ) def test_urls_for_dirhtml_builder(app, status, warning): app.build() @@ -409,6 +413,7 @@ def test_sphinx_resource_urls(app, status, warning): srcdir=srcdir, confoverrides={ 'notfound_urls_prefix': '/ja/default/', + 'html_theme': 'alabaster', }, ) def test_toctree_urls_notfound_default(app, status, warning): @@ -435,6 +440,7 @@ def test_toctree_urls_notfound_default(app, status, warning): @pytest.mark.sphinx( srcdir=srcdir, + confoverrides={'html_theme': 'alabaster'}, ) def test_toctree_links(app, status, warning): app.build() @@ -456,6 +462,7 @@ def test_toctree_links(app, status, warning): srcdir=srcdir, confoverrides={ 'notfound_urls_prefix': '/pt-br/stable/', + 'html_theme': 'alabaster', }, ) def test_toctree_links_custom_settings(app, status, warning):