From 491ea985bb06eb7dc9e43bdd99006b36ba104b72 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Fri, 14 Apr 2023 13:47:28 +0200 Subject: [PATCH] Don't test for jquery.js presence with Sphinx 6+ --- tests/test_urls.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_urls.py b/tests/test_urls.py index 6475715..faafbea 100644 --- a/tests/test_urls.py +++ b/tests/test_urls.py @@ -528,11 +528,18 @@ def test_sphinx_resource_urls(app, status, warning): chunks = [ # Sphinx's resources URLs - _get_js_html_link_tag('en', 'latest', 'jquery.js'), - _get_js_html_link_tag('en', 'latest', 'underscore.js'), _get_js_html_link_tag('en', 'latest', 'doctools.js'), ] + # Sphinx 6+ no longer includes jquery.js and underscore.js + if sphinx.version_info < (6, 0, 0): + chunks.extend( + [ + _get_js_html_link_tag('en', 'latest', 'jquery.js'), + _get_js_html_link_tag('en', 'latest', 'underscore.js'), + ] + ) + # This file was added to all the HTML pages in Sphinx>=1.8. However, it was # only required for search page. Sphinx>=3.4 fixes this and only adds it on # search. See (https://github.com/sphinx-doc/sphinx/blob/v3.4.0/CHANGES#L87) -- 2.39.2