pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
600 stars 313 forks source link

0.14.2: pytest fails in more than half units #1541

Closed kloczek closed 3 months ago

kloczek commented 11 months ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

Here is pytest output summary:

================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_a11y.py:14: could not import 'playwright': No module named 'playwright'
FAILED tests/test_build.py::test_build_html - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_toc_visibility - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_icon_links - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_alt_text[confoverrides0-PyData Tests  documentation - Home] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_alt_text[confoverrides1-] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_alt_text[confoverrides2-Bar] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_basic - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_no_image - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_two_images - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_primary_logo_is_light_when_no_default_mode - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_primary_logo_is_light_when_default_mode_is_set_to_auto - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_primary_logo_is_light_when_default_mode_is_light - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_primary_logo_is_dark_when_default_mode_is_dark - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_external_link - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_logo_external_image - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_align[content-klass0] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_align[left-klass1] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_align[right-klass2] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_no_in_page_headers - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_header_dropdown[0] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_header_dropdown[4] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_header_dropdown[8] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_header_dropdown_button[None] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_navbar_header_dropdown_button[Other] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_sidebars_captions - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_sidebars_nested_page - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_sidebars_level2 - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_sidebars_show_nav_level0 - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_included_toc - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_footer - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context0-edit_text_and_url0] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context1-edit_text_and_url1] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context2-edit_text_and_url2] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context3-edit_text_and_url3] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context4-edit_text_and_url4] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context5-edit_text_and_url5] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context9-edit_text_and_url9] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context11-edit_text_and_url11] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context12-edit_text_and_url12] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_edit_page_url[html_context13-edit_text_and_url13] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_analytics[provider0-tags0] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_analytics[provider1-tags1] - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_plausible - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_show_nav_level - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_version_switcher_error_states[missing_url.json] - assert 'WARNING: The...k to monokai.' == 'WARNING: The..."version" key'
FAILED tests/test_build.py::test_theme_switcher - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_shorten_link - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_math_header_item - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_pygments_fallbacks[style_names1-keyword_colors1] - AssertionError: assert ['\x1b[91mWAR...1b[39;49;00m'] == ['']
FAILED tests/test_build.py::test_deprecated_build_html - assert 7 == 5
FAILED tests/test_build.py::test_empty_templates - AssertionError: Running Sphinx v7.1.2
FAILED tests/test_build.py::test_translations - AssertionError: Running Sphinx v7.1.2
========================================================================= 52 failed, 9 passed, 1 skipped in 20.55s ==========================================================================

Here is list of installed modules in build env

```console Package Version ----------------------------- --------- ablog 0.11.6 alabaster 0.7.13 asttokens 2.2.1 attrs 23.1.0 Babel 2.13.1 backcall 0.2.0 beautifulsoup4 4.12.2 bleach 6.1.0 build 1.0.0 charset-normalizer 3.3.1 click 8.1.7 comm 0.1.4 contourpy 1.0.7 cppclean 0.13 cycler 0.12.1 debugpy 1.8.0 decorator 5.1.1 defusedxml 0.7.1 distro 1.8.0 docutils 0.20.1 exceptiongroup 1.1.3 executing 1.2.0 fastjsonschema 2.18.0 feedgen 0.9.0 fonttools 4.43.1 gpg 1.22.0 greenlet 2.0.2 html5lib 1.1 idna 3.4 imagesize 1.4.1 importlib-metadata 6.8.0 importlib-resources 6.1.0 iniconfig 2.0.0 installer 0.7.0 invoke 2.2.0 ipykernel 6.26.0 ipython 8.12.0 ipywidgets 8.0.3 jedi 0.19.0 Jinja2 3.1.2 jsonschema 4.19.1 jsonschema-specifications 2023.7.1 jupyter-cache 0.5.0 jupyter_client 8.4.0 jupyter_core 5.3.1 jupyter-sphinx 0.4.0 jupyterlab-pygments 0.1.2 jupyterlab-widgets 3.0.8 kiwisolver 1.4.5 lxml 4.9.3 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.6.3 matplotlib-inline 0.1.6 mdit-py-plugins 0.4.0 mdurl 0.1.2 mistune 2.0.5 myst-nb 1.0.0rc0 myst-parser 2.0.0 nbclient 0.8.0 nbconvert 7.8.0 nbformat 5.9.2 nest-asyncio 1.5.8 nodeenv 1.8.0 numpy 1.24.4 numpydoc 1.6.0 olefile 0.46 packaging 23.2 pandas 2.0.3 pandocfilters 1.5.0 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 10.1.0 pkgutil_resolve_name 1.3.10 platformdirs 3.11.0 plotly 5.14.1 pluggy 1.3.0 prompt-toolkit 3.0.39 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 Pygments 2.16.1 pyparsing 3.1.1 pyproject_hooks 1.0.0 pyproject-metadata 0.7.1 pytest 7.4.3 pytest-datadir 1.5.0 pytest-regressions 2.5.0 python-dateutil 2.8.2 pytz 2023.3 PyYAML 6.0.1 pyzmq 25.1.1 referencing 0.30.2 requests 2.31.0 rich 13.6.0 rpds-py 0.10.6 setuptools 68.2.2 six 1.16.0 snowballstemmer 2.2.0 soupsieve 2.5 Sphinx 7.1.2 sphinx-copybutton 0.5.2 sphinx_design 0.5.0 sphinx-sitemap 2.5.1 sphinx-theme-builder 0.2.0b2 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.4 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.9 sphinxext-rediraffe 0.2.7 SQLAlchemy 2.0.22 stack-data 0.6.3 tabulate 0.9.0 tenacity 8.2.3 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.3 traitlets 5.11.2 typing_extensions 4.8.0 urllib3 1.26.18 watchdog 3.0.0 wcwidth 0.2.8 webencodings 0.5.1 wheel 0.41.2 widgetsnbextension 4.0.9 xarray 2022.12.0 zipp 3.17.0 ```
kloczek commented 11 months ago

Here is full pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pydata-sphinx-theme-0.14.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pydata-sphinx-theme-0.14.2-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/pydata-sphinx-theme-0.14.2 configfile: pyproject.toml plugins: datadir-1.5.0, regressions-2.5.0 collected 61 items / 1 skipped tests/test_build.py FFFFFFFFFFFFF.FF.FFFFFFFFFFFFFFFFFFFFF...F.FFFFFFF..FFFF.FFFF [100%] ========================================================================================= FAILURES ========================================================================================== ______________________________________________________________________________________ test_build_html ______________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd1511160> file_regression = def test_build_html(sphinx_build_factory, file_regression) -> None: """Test building the base html template and config.""" sphinx_build = sphinx_build_factory("base") # Basic build with defaults > sphinx_build.build() tests/test_build.py:16: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_build_html0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ____________________________________________________________________________________ test_toc_visibility ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd1422c10> def test_toc_visibility(sphinx_build_factory) -> None: """Test that setting TOC level visibility works as expected.""" confoverrides = { "html_theme_options.show_toc_level": 2, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_toc_visibility0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________________ test_icon_links ______________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0694820> file_regression = def test_icon_links(sphinx_build_factory, file_regression) -> None: """Test that setting icon links are rendered in the documentation.""" html_theme_options_icon_links = { "navigation_with_keys": False, "icon_links": [ { "name": "FONTAWESOME", "url": "https://site1.org", "icon": "FACLASS", "type": "fontawesome", }, { "name": "FONTAWESOME DEFAULT", "url": "https://site2.org", "icon": "FADEFAULTCLASS", # No type so we can test that the default is fontawesome }, { "name": "LOCAL FILE", "url": "https://site3.org", "icon": "emptylogo.png", # Logo is our only test site img "type": "local", }, { "name": "WRONG TYPE", "url": "https://site4.org", "icon": "WRONG TYPE", # Because the type is inccorect, this should output an error `span` "type": "incorrecttype", }, { "name": "URL", "url": "https://site5.org", "icon": "https://site5.org/image.svg", "type": "url", }, { "name": "FONTAWESOME", "url": "https://site1.org", "icon": "FACLASS", "type": "fontawesome", "attributes": { # This should over-ride the href above "href": "https://override.com", # This should add a new icon link attribute "foo": "bar", # CSS classes should be totally overwritten "class": "overridden classes", }, }, ], } confoverrides = {"html_theme_options": html_theme_options_icon_links} > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:107: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_icon_links0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________ test_logo_alt_text[confoverrides0-PyData Tests documentation - Home] ___________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd084d430>, confoverrides = {'html_theme_options': {'navigation_with_keys': False}} expected_alt_text = 'PyData Tests documentation - Home' @pytest.mark.parametrize( "confoverrides,expected_alt_text", ( [dict(), "PyData Tests documentation - Home"], [dict(html_theme_options=dict(logo=dict(text="Foo"))), ""], [dict(html_theme_options=dict(logo=dict(text="Foo", alt_text="Bar"))), "Bar"], ), ) def test_logo_alt_text(sphinx_build_factory, confoverrides, expected_alt_text) -> None: """Test our alt-text fallback mechanism.""" confoverrides["html_theme_options"] = ( confoverrides.get("html_theme_options", False) or dict() ) confoverrides["html_theme_options"].update({"navigation_with_keys": False}) > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:129: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_alt_text_confoverrid0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ____________________________________________________________________________ test_logo_alt_text[confoverrides1-] ____________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0847dc0> confoverrides = {'html_theme_options': {'logo': {'image_relative': {'dark': '_static/emptylogo.png', 'light': '_static/emptylogo.png'}, 'text': 'Foo'}, 'navigation_with_keys': False}} expected_alt_text = '' @pytest.mark.parametrize( "confoverrides,expected_alt_text", ( [dict(), "PyData Tests documentation - Home"], [dict(html_theme_options=dict(logo=dict(text="Foo"))), ""], [dict(html_theme_options=dict(logo=dict(text="Foo", alt_text="Bar"))), "Bar"], ), ) def test_logo_alt_text(sphinx_build_factory, confoverrides, expected_alt_text) -> None: """Test our alt-text fallback mechanism.""" confoverrides["html_theme_options"] = ( confoverrides.get("html_theme_options", False) or dict() ) confoverrides["html_theme_options"].update({"navigation_with_keys": False}) > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:129: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_alt_text_confoverrid1/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________________ test_logo_alt_text[confoverrides2-Bar] ___________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0538940> confoverrides = {'html_theme_options': {'logo': {'alt_text': 'Bar', 'image_relative': {'dark': '_static/emptylogo.png', 'light': '_static/emptylogo.png'}, 'text': 'Foo'}, 'navigation_with_keys': False}} expected_alt_text = 'Bar' @pytest.mark.parametrize( "confoverrides,expected_alt_text", ( [dict(), "PyData Tests documentation - Home"], [dict(html_theme_options=dict(logo=dict(text="Foo"))), ""], [dict(html_theme_options=dict(logo=dict(text="Foo", alt_text="Bar"))), "Bar"], ), ) def test_logo_alt_text(sphinx_build_factory, confoverrides, expected_alt_text) -> None: """Test our alt-text fallback mechanism.""" confoverrides["html_theme_options"] = ( confoverrides.get("html_theme_options", False) or dict() ) confoverrides["html_theme_options"].update({"navigation_with_keys": False}) > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:129: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_alt_text_confoverrid2/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________________ test_logo_basic ______________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0732af0> def test_logo_basic(sphinx_build_factory) -> None: """Test that the logo is shown by default, project title if no logo.""" > sphinx_build = sphinx_build_factory("base").build() tests/test_build.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_basic0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ____________________________________________________________________________________ test_logo_no_image _____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03abaf0> def test_logo_no_image(sphinx_build_factory) -> None: """Test that the text is shown if no image specified.""" confoverrides = { "html_logo": "", "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_no_image0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________________________ test_logo_two_images ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd084dc10> def test_logo_two_images(sphinx_build_factory) -> None: """Test that the logo image / text is correct when both dark / light given.""" # Test with a specified title and a dark logo confoverrides = { "html_theme_options": { "navigation_with_keys": False, "logo": { "text": "Foo Title", "image_dark": "_static/emptydarklogo.png", }, }, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:170: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_two_images0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________ test_primary_logo_is_light_when_no_default_mode ______________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd1422a60> def test_primary_logo_is_light_when_no_default_mode(sphinx_build_factory) -> None: """Test that the primary logo image is light when no default mode is set.""" # Ensure no default mode is set confoverrides = { "html_context": {}, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_primary_logo_is_light_whe0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ________________________________________________________________ test_primary_logo_is_light_when_default_mode_is_set_to_auto ________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03a9820> def test_primary_logo_is_light_when_default_mode_is_set_to_auto( sphinx_build_factory, ) -> None: """Test that the primary logo image is light when default is set to auto.""" # Ensure no default mode is set confoverrides = { "html_context": {"default_mode": "auto"}, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_primary_logo_is_light_whe1/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_primary_logo_is_light_when_default_mode_is_light ___________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0a7d160> def test_primary_logo_is_light_when_default_mode_is_light(sphinx_build_factory) -> None: """Test that the primary logo image is light when default mode is set to light.""" # Ensure no default mode is set confoverrides = { "html_context": {"default_mode": "light"}, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_primary_logo_is_light_whe2/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ____________________________________________________________________ test_primary_logo_is_dark_when_default_mode_is_dark ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd090f1f0> def test_primary_logo_is_dark_when_default_mode_is_dark(sphinx_build_factory) -> None: """Test that the primary logo image is dark when default mode is set to dark.""" # Ensure no default mode is set confoverrides = { "html_context": {"default_mode": "dark"}, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:229: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_primary_logo_is_dark_when0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________________________ test_logo_external_link __________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd06859d0> def test_logo_external_link(sphinx_build_factory) -> None: """Test that the logo link is correct for external URLs.""" # Test with a specified external logo link test_url = "https://secure.example.com" confoverrides = { "html_theme_options": { "navigation_with_keys": False, "logo": { "link": test_url, }, }, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:266: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_external_link0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _________________________________________________________________________________ test_logo_external_image __________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd048e9d0> def test_logo_external_image(sphinx_build_factory) -> None: """Test that the logo link is correct for external URLs.""" # Test with a specified external logo image source test_url = "https://pydata.org/wp-content/uploads/2019/06/pydata-logo-final.png" confoverrides = { "html_theme_options": { "navigation_with_keys": False, "logo": { "image_dark": test_url, }, }, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_logo_external_image0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _____________________________________________________________________________ test_navbar_align[content-klass0] _____________________________________________________________________________ align = 'content', klass = ('col-lg-3', 'col-lg-9', 'me-auto'), sphinx_build_factory = ._func at 0x7f8bd07979d0> @pytest.mark.parametrize( "align,klass", [ ("content", ("col-lg-3", "col-lg-9", "me-auto")), ("left", ("", "", "me-auto")), ("right", ("", "", "ms-auto")), ], ) def test_navbar_align(align, klass, sphinx_build_factory) -> None: """The navbar items align with the proper part of the page.""" confoverrides = { "html_theme_options.navbar_align": align, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_align_content_klas0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_align[left-klass1] _______________________________________________________________________________ align = 'left', klass = ('', '', 'me-auto'), sphinx_build_factory = ._func at 0x7f8bd06e91f0> @pytest.mark.parametrize( "align,klass", [ ("content", ("col-lg-3", "col-lg-9", "me-auto")), ("left", ("", "", "me-auto")), ("right", ("", "", "ms-auto")), ], ) def test_navbar_align(align, klass, sphinx_build_factory) -> None: """The navbar items align with the proper part of the page.""" confoverrides = { "html_theme_options.navbar_align": align, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_align_left_klass1_0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_align[right-klass2] ______________________________________________________________________________ align = 'right', klass = ('', '', 'ms-auto'), sphinx_build_factory = ._func at 0x7f8bd07159d0> @pytest.mark.parametrize( "align,klass", [ ("content", ("col-lg-3", "col-lg-9", "me-auto")), ("left", ("", "", "me-auto")), ("right", ("", "", "ms-auto")), ], ) def test_navbar_align(align, klass, sphinx_build_factory) -> None: """The navbar items align with the proper part of the page.""" confoverrides = { "html_theme_options.navbar_align": align, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:319: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_align_right_klass20/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_no_in_page_headers _______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd05b3ca0> file_regression = def test_navbar_no_in_page_headers(sphinx_build_factory, file_regression) -> None: """Test navbar elements did not change (regression test).""" # https://github.com/pydata/pydata-sphinx-theme/issues/302 > sphinx_build = sphinx_build_factory("test_navbar_no_in_page_headers").build() tests/test_build.py:334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 3 source files that are out of date E updating environment: [new config] 3 added, 0 changed, 0 removed reading sources... [100%] page2 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] page2 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_no_in_page_headers0/test_navbar_no_in_page_headers/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_header_dropdown[0] _______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd05b3f70>, n_links = 0 @pytest.mark.parametrize("n_links", (0, 4, 8)) # 0 = only dropdown, 8 = no dropdown def test_navbar_header_dropdown(sphinx_build_factory, n_links) -> None: """Test whether dropdown appears based on number of header links + config.""" extra_links = [{"url": f"https://{ii}.org", "name": ii} for ii in range(3)] confoverrides = { "html_theme_options": { "navigation_with_keys": False, "external_links": extra_links, "header_links_before_dropdown": n_links, } } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_header_dropdown_0_0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_header_dropdown[4] _______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0732e50>, n_links = 4 @pytest.mark.parametrize("n_links", (0, 4, 8)) # 0 = only dropdown, 8 = no dropdown def test_navbar_header_dropdown(sphinx_build_factory, n_links) -> None: """Test whether dropdown appears based on number of header links + config.""" extra_links = [{"url": f"https://{ii}.org", "name": ii} for ii in range(3)] confoverrides = { "html_theme_options": { "navigation_with_keys": False, "external_links": extra_links, "header_links_before_dropdown": n_links, } } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_header_dropdown_4_0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_navbar_header_dropdown[8] _______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd08ae160>, n_links = 8 @pytest.mark.parametrize("n_links", (0, 4, 8)) # 0 = only dropdown, 8 = no dropdown def test_navbar_header_dropdown(sphinx_build_factory, n_links) -> None: """Test whether dropdown appears based on number of header links + config.""" extra_links = [{"url": f"https://{ii}.org", "name": ii} for ii in range(3)] confoverrides = { "html_theme_options": { "navigation_with_keys": False, "external_links": extra_links, "header_links_before_dropdown": n_links, } } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_header_dropdown_8_0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _________________________________________________________________________ test_navbar_header_dropdown_button[None] __________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd06b6310>, dropdown_text = None @pytest.mark.parametrize("dropdown_text", (None, "Other")) # None -> default "More" def test_navbar_header_dropdown_button(sphinx_build_factory, dropdown_text) -> None: """Test whether dropdown button text is configurable.""" if dropdown_text: confoverrides = { "html_theme_options": { "navigation_with_keys": False, "header_links_before_dropdown": 2, "header_dropdown_text": dropdown_text, } } else: confoverrides = { "html_theme_options": { "navigation_with_keys": False, "header_links_before_dropdown": 2, } } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:387: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_header_dropdown_bu0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _________________________________________________________________________ test_navbar_header_dropdown_button[Other] _________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd08b20d0>, dropdown_text = 'Other' @pytest.mark.parametrize("dropdown_text", (None, "Other")) # None -> default "More" def test_navbar_header_dropdown_button(sphinx_build_factory, dropdown_text) -> None: """Test whether dropdown button text is configurable.""" if dropdown_text: confoverrides = { "html_theme_options": { "navigation_with_keys": False, "header_links_before_dropdown": 2, "header_dropdown_text": dropdown_text, } } else: confoverrides = { "html_theme_options": { "navigation_with_keys": False, "header_links_before_dropdown": 2, } } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:387: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_navbar_header_dropdown_bu1/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________________________ test_sidebars_captions ___________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0518550> file_regression = def test_sidebars_captions(sphinx_build_factory, file_regression) -> None: """Test that the captions are rendered.""" > sphinx_build = sphinx_build_factory("sidebars").build() tests/test_build.py:401: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 8 source files that are out of date E updating environment: [new config] 8 added, 0 changed, 0 removed reading sources... [100%] section2/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section2/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_sidebars_captions0/sidebars/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _________________________________________________________________________________ test_sidebars_nested_page _________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0797160> file_regression = def test_sidebars_nested_page(sphinx_build_factory, file_regression) -> None: """Test that nested pages are shown in the sidebar.""" > sphinx_build = sphinx_build_factory("sidebars").build() tests/test_build.py:412: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 8 source files that are out of date E updating environment: [new config] 8 added, 0 changed, 0 removed reading sources... [100%] section2/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section2/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_sidebars_nested_page0/sidebars/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________________________ test_sidebars_level2 ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd072c790> file_regression = def test_sidebars_level2(sphinx_build_factory, file_regression) -> None: """Test sidebars in a second-level page w/ children.""" confoverrides = { "templates_path": ["_templates_sidebar_level2"], "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("sidebars", confoverrides=confoverrides).build() tests/test_build.py:427: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 8 source files that are out of date E updating environment: [new config] 8 added, 0 changed, 0 removed reading sources... [100%] section2/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section2/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_sidebars_level20/sidebars/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _______________________________________________________________________________ test_sidebars_show_nav_level0 _______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd072c670> def test_sidebars_show_nav_level0(sphinx_build_factory) -> None: """Regression test for show_nav_level:0 when the toc is divided into parts. Testing both home page and a subsection page for correct elements. """ confoverrides = { "html_theme_options.show_nav_level": 0, "html_theme_options.navigation_with_keys": False, } > sphinx_build = sphinx_build_factory("sidebars", confoverrides=confoverrides).build() tests/test_build.py:445: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 8 source files that are out of date E updating environment: [new config] 8 added, 0 changed, 0 removed reading sources... [100%] section2/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section2/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_sidebars_show_nav_level00/sidebars/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _____________________________________________________________________________________ test_included_toc _____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd06a7940> def test_included_toc(sphinx_build_factory) -> None: """Test that Sphinx project containing TOC (.. toctree::) included via .. include:: can be successfully built.""" # Regression test for bug resolved in #347. # Tests mainly makes sure that the sphinx_build.build() does not raise exception. # https://github.com/pydata/pydata-sphinx-theme/pull/347 > sphinx_build = sphinx_build_factory("test_included_toc").build() tests/test_build.py:485: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 3 source files that are out of date E updating environment: [new config] 3 added, 0 changed, 0 removed reading sources... [100%] toc-extension.include E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] toc-extension.include E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_included_toc0/test_included_toc/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ________________________________________________________________________________________ test_footer ________________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0536550> def test_footer(sphinx_build_factory) -> None: """Test for expected footer contents.""" overrides = { "html_theme_options.footer_start": ["copyright.html"], "html_theme_options.footer_center": ["sphinx-version.html"], } > sphinx_build = sphinx_build_factory("base", confoverrides=overrides).build() tests/test_build.py:496: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_footer0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context0-edit_text_and_url0] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0269ee0> html_context = {'doc_path': 'docs', 'github_repo': 'bar', 'github_user': 'foo', 'github_version': 'HEAD'} edit_text_and_url = ('Edit on GitHub', 'https://github.com/foo/bar/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context1-edit_text_and_url1] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd05365e0> html_context = {'doc_path': 'docs', 'gitlab_repo': 'bar', 'gitlab_user': 'foo', 'gitlab_version': 'HEAD'} edit_text_and_url = ('Edit on GitLab', 'https://gitlab.com/foo/bar/-/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex1/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context2-edit_text_and_url2] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03ba5e0> html_context = {'bitbucket_repo': 'bar', 'bitbucket_user': 'foo', 'bitbucket_version': 'HEAD', 'doc_path': 'docs'} edit_text_and_url = ('Edit on Bitbucket', 'https://bitbucket.org/foo/bar/src/HEAD/docs/index.rst?mode=edit') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex2/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context3-edit_text_and_url3] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03e5dc0> html_context = {'doc_path': 'docs/', 'github_repo': 'bar', 'github_user': 'foo', 'github_version': 'HEAD'} edit_text_and_url = ('Edit on GitHub', 'https://github.com/foo/bar/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex3/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context4-edit_text_and_url4] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0573ca0> html_context = {'doc_path': 'docs/', 'gitlab_repo': 'bar', 'gitlab_user': 'foo', 'gitlab_version': 'HEAD'} edit_text_and_url = ('Edit on GitLab', 'https://gitlab.com/foo/bar/-/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex4/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context5-edit_text_and_url5] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd05a5550> html_context = {'bitbucket_repo': 'bar', 'bitbucket_user': 'foo', 'bitbucket_version': 'HEAD', 'doc_path': 'docs/'} edit_text_and_url = ('Edit on Bitbucket', 'https://bitbucket.org/foo/bar/src/HEAD/docs/index.rst?mode=edit') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex5/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_edit_page_url[html_context9-edit_text_and_url9] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd08683a0> html_context = {'edit_page_url_template': 'https://dvcs.example.com/foo/bar/edit/HEAD/{{ file_name }}'}, edit_text_and_url = ('Edit', 'https://dvcs.example.com/foo/bar/edit/HEAD/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex9/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________ test_edit_page_url[html_context11-edit_text_and_url11] ___________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd1511b80> html_context = {'doc_path': 'docs', 'github_repo': 'bar', 'github_url': 'https://github.example.com', 'github_user': 'foo', ...} edit_text_and_url = ('Edit on GitHub', 'https://github.example.com/foo/bar/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex11/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________ test_edit_page_url[html_context12-edit_text_and_url12] ___________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd04278b0> html_context = {'doc_path': 'docs', 'gitlab_repo': 'bar', 'gitlab_url': 'https://gitlab.example.com', 'gitlab_user': 'foo', ...} edit_text_and_url = ('Edit on GitLab', 'https://gitlab.example.com/foo/bar/-/edit/HEAD/docs/index.rst') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex12/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError __________________________________________________________________ test_edit_page_url[html_context13-edit_text_and_url13] ___________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0868ca0> html_context = {'bitbucket_repo': 'bar', 'bitbucket_url': 'https://bitbucket.example.com', 'bitbucket_user': 'foo', 'bitbucket_version': 'HEAD', ...} edit_text_and_url = ('Edit on Bitbucket', 'https://bitbucket.example.com/foo/bar/src/HEAD/docs/index.rst?mode=edit') @pytest.mark.parametrize("html_context,edit_text_and_url", all_edits) def test_edit_page_url(sphinx_build_factory, html_context, edit_text_and_url) -> None: """Test the edit this page generated link.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.use_edit_page_button": True, "html_context": html_context, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) if edit_text_and_url is None: with pytest.raises( sphinx.errors.ExtensionError, match="Missing required value" ): sphinx_build.build() return edit_text, edit_url = edit_text_and_url > sphinx_build.build() tests/test_build.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_edit_page_url_html_contex13/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_analytics[provider0-tags0] ______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03ab700> provider = {'html_theme_options.analytics': {'google_analytics_id': 'G-XXXXX'}, 'html_theme_options.navigation_with_keys': False}, tags = ['gtag', 'G-XXXXX'] @pytest.mark.parametrize( "provider,tags", [ # google analytics ( {"html_theme_options.analytics": {"google_analytics_id": "G-XXXXX"}}, ["gtag", "G-XXXXX"], ), # google and plausible ( { "html_theme_options.analytics": { "google_analytics_id": "G-XXXXX", "plausible_analytics_domain": "toto", "plausible_analytics_url": "http://.../script.js", } }, ["gtag", "G-XXXXX"], ), ], ) def test_analytics(sphinx_build_factory, provider, tags) -> None: """Check the Google analytics.""" confoverrides = provider confoverrides.update({"html_theme_options.navigation_with_keys": False}) sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) > sphinx_build.build() tests/test_build.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_analytics_provider0_tags00/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________ test_analytics[provider1-tags1] ______________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03ab310> provider = {'html_theme_options.analytics': {'google_analytics_id': 'G-XXXXX', 'plausible_analytics_domain': 'toto', 'plausible_analytics_url': 'http://.../script.js'}, 'html_theme_options.navigation_with_keys': False} tags = ['gtag', 'G-XXXXX'] @pytest.mark.parametrize( "provider,tags", [ # google analytics ( {"html_theme_options.analytics": {"google_analytics_id": "G-XXXXX"}}, ["gtag", "G-XXXXX"], ), # google and plausible ( { "html_theme_options.analytics": { "google_analytics_id": "G-XXXXX", "plausible_analytics_domain": "toto", "plausible_analytics_url": "http://.../script.js", } }, ["gtag", "G-XXXXX"], ), ], ) def test_analytics(sphinx_build_factory, provider, tags) -> None: """Check the Google analytics.""" confoverrides = provider confoverrides.update({"html_theme_options.navigation_with_keys": False}) sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) > sphinx_build.build() tests/test_build.py:690: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_analytics_provider1_tags10/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ______________________________________________________________________________________ test_plausible _______________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03a98b0> def test_plausible(sphinx_build_factory) -> None: """Test the Plausible analytics.""" provider = { "html_theme_options.navigation_with_keys": False, "html_theme_options.analytics": { "plausible_analytics_domain": "toto", "plausible_analytics_url": "http://.../script.js", }, } confoverrides = provider sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides) > sphinx_build.build() tests/test_build.py:712: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_plausible0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ____________________________________________________________________________________ test_show_nav_level ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd0269ee0> def test_show_nav_level(sphinx_build_factory) -> None: """The navbar items align with the proper part of the page.""" confoverrides = { "html_theme_options.navigation_with_keys": False, "html_theme_options.show_nav_level": 2, } > sphinx_build = sphinx_build_factory("sidebars", confoverrides=confoverrides).build() tests/test_build.py:729: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 8 source files that are out of date E updating environment: [new config] 8 added, 0 changed, 0 removed reading sources... [100%] section2/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section2/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_show_nav_level0/sidebars/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_version_switcher_error_states[missing_url.json] ____________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd06bd430> file_regression = , url = 'missing_url.json' @pytest.mark.parametrize("url", switcher_files) def test_version_switcher_error_states( sphinx_build_factory, file_regression, url ) -> None: """Regression test the version switcher dropdown HTML. Note that a lot of the switcher HTML gets populated by JavaScript, so we will not test the final behavior. This just tests for the basic structure. TODO: Find a way to test Javascript's behavior in populating the HTML. """ confoverrides = { "html_theme_options": { "navigation_with_keys": False, "navbar_end": ["version-switcher"], "switcher": { "json_url": url, "version_match": "0.7.1", }, } } factory = sphinx_build_factory("base", confoverrides=confoverrides) sphinx_build = factory.build(no_warning=False) if url == "switcher.json": # this should work index = sphinx_build.html_tree("index.html") switcher = index.select(".navbar-header-items")[0].find( "script", string=re.compile(".version-switcher__container") ) file_regression.check( switcher.prettify(), basename="navbar_switcher", extension=".html" ) elif url == "http://a.b/switcher.json": # this file doesn't exist" not_read = 'WARNING: The version switcher "http://a.b/switcher.json" file cannot be read due to the following error:\n' assert not_read in escape_ansi(sphinx_build.warnings).strip() elif url == "missing_url.json": # this file is missing the url key for one version missing_url = 'WARNING: The version switcher "missing_url.json" file is malformed at least one of the items is missing the "url" or "version" key' > assert escape_ansi(sphinx_build.warnings).strip() == missing_url E assert 'WARNING: The...k to monokai.' == 'WARNING: The..."version" key' E Skipping 119 identical leading characters in diff, use -v to show E - ersion" key E + ersion" key E ? + E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/test_build.py:782: AssertionError ____________________________________________________________________________________ test_theme_switcher ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd05b2820> file_regression = def test_theme_switcher(sphinx_build_factory, file_regression) -> None: """Regression test for the theme switcher button.""" > sphinx_build = sphinx_build_factory("base").build() tests/test_build.py:787: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_theme_switcher0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _____________________________________________________________________________________ test_shorten_link _____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd04fa040> file_regression = def test_shorten_link(sphinx_build_factory, file_regression) -> None: """Regression test for "edit on " link shortening.""" > sphinx_build = sphinx_build_factory("base").build() tests/test_build.py:800: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_shorten_link0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________________________ test_math_header_item ___________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd07dc940> file_regression = def test_math_header_item(sphinx_build_factory, file_regression) -> None: """Regression test for math items in a header title.""" > sphinx_build = sphinx_build_factory("base").build() tests/test_build.py:811: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_math_header_item0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ___________________________________________________________________ test_pygments_fallbacks[style_names1-keyword_colors1] ___________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd03f5310>, style_names = ('a11y-high-contrast-light', 'a11y-high-contrast-dark') keyword_colors = ('#7928a1', '#dcc6e0') @pytest.mark.parametrize( "style_names,keyword_colors", [ (("fake_foo", "fake_bar"), ("#204a87", "#66d9ef")), ( ("a11y-high-contrast-light", "a11y-high-contrast-dark"), ("#7928a1", "#dcc6e0"), ), ], ) def test_pygments_fallbacks(sphinx_build_factory, style_names, keyword_colors) -> None: """Test that setting color themes works. NOTE: the expected keyword colors for fake_foo and fake_bar are the colors from the fallback styles (tango and monokai, respectively). """ confoverrides = { "html_theme_options": { "navigation_with_keys": False, "pygment_light_style": style_names[0], "pygment_dark_style": style_names[1], }, } sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build( no_warning=False ) warnings = sphinx_build.warnings.strip().split("\n") # see if our warnings worked if style_names[0].startswith("fake"): assert len(warnings) == 2 re.match(r"Color theme fake_foo.*tango", warnings[0]) re.match(r"Color theme fake_bar.*monokai", warnings[1]) else: > assert warnings == [""] E AssertionError: assert ['\x1b[91mWAR...1b[39;49;00m'] == [''] E At index 0 diff: '\x1b[91mWARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango.\x1b[39;49;00m' != '' E Left contains one more item: '\x1b[91mWARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai.\x1b[39;49;00m' E Use -v to get more diff tests/test_build.py:849: AssertionError ________________________________________________________________________________ test_deprecated_build_html _________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd090f310> file_regression = def test_deprecated_build_html(sphinx_build_factory, file_regression) -> None: """Test building the base html template with all the deprecated configs.""" sphinx_build = sphinx_build_factory("deprecated") # Basic build with defaults sphinx_build.build(no_warning=False) assert (sphinx_build.outdir / "index.html").exists(), sphinx_build.outdir.glob("*") # check the deprecation warnings warnings = sphinx_build.warnings.strip("\n").split("\n") warnings = [w.lstrip("\x1b[91m").rstrip("\x1b[39;49;00m\n") for w in warnings] expected_warnings = ( "The default value for `navigation_with_keys` will change", "The configuration `logo_text` is deprecated", "The configuration `favicons` is deprecated.", "`footer_items` is deprecated", "unsupported theme option 'logo_text'", ) > assert len(warnings) == len(expected_warnings) E assert 7 == 5 E + where 7 = len(["WARNING: The configuration `logo_text` is deprecated.Use `'logo': {'text': }`.", 'WARNING: `footer_items` is depreca...ext' given", 'WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango.', ...]) E + and 5 = len(('The default value for `navigation_with_keys` will change', 'The configuration `logo_text` is deprecated', 'The configuration `favicons` is deprecated.', '`footer_items` is deprecated', "unsupported theme option 'logo_text'")) tests/test_build.py:887: AssertionError ___________________________________________________________________________________ test_empty_templates ____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd04cfdc0> def test_empty_templates(sphinx_build_factory) -> None: """If a template is empty (e.g., via a config), it should be removed.""" # When configured to be gone, the template should be removed w/ its parent. # ABlog needs to be added so we can test that template rendering works w/ it. confoverrides = { "html_theme_options.navigation_with_keys": False, "html_show_sourcelink": False, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:921: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in English (code: en)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_empty_templates0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError _____________________________________________________________________________________ test_translations _____________________________________________________________________________________ sphinx_build_factory = ._func at 0x7f8bd04f3040> def test_translations(sphinx_build_factory) -> None: """Test that basic translation functionality works. This will build our test site with the French language, and test that a few phrases are in French. We use this test to catch regressions if we change wording without changing the translation files. """ confoverrides = { "language": "fr", "html_context": { "github_user": "pydata", "github_repo": "pydata-sphinx-theme", "github_version": "main", }, "html_theme_options": { "navigation_with_keys": False, "use_edit_page_button": True, }, } > sphinx_build = sphinx_build_factory("base", confoverrides=confoverrides).build() tests/test_build.py:952: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , no_warning = True def build(self, no_warning: bool = True) -> Self: """Build the application.""" self.app.build() if no_warning is True: > assert self.warnings == "", self.status E AssertionError: Running Sphinx v7.1.2 E loading translations [fr]... not available for built-in messages E building [mo]: targets for 0 po files that are out of date E writing output... E building [html]: targets for 5 source files that are out of date E updating environment: [new config] 5 added, 0 changed, 0 removed reading sources... [100%] section1/page1 E looking for now-outdated files... none found E pickling environment... done E checking consistency... done E preparing documents... done E copying assets... copying static files... done E copying extra files... done E done writing output... [100%] section1/page1 E generating indices... genindex done E writing additional pages... search done E dumping search index in French (code: fr)... done E dumping object inventory... done E build succeeded, 2 warnings. E E The HTML pages are in ../../../../../tmp/pytest-of-tkloczko/pytest-12/test_translations0/base/_build/html. E E assert '\x1b[91mWARN...b[39;49;00m\n' == '' E + WARNING: Highlighting style a11y-high-contrast-light not found by pygments, falling back to tango. E + WARNING: Highlighting style a11y-high-contrast-dark not found by pygments, falling back to monokai. tests/conftest.py:41: AssertionError ================================================================================== short test summary info ================================================================================== SKIPPED [1] tests/test_a11y.py:14: could not import 'playwright': No module named 'playwright' FAILED tests/test_build.py::test_build_html - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_toc_visibility - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_icon_links - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_alt_text[confoverrides0-PyData Tests documentation - Home] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_alt_text[confoverrides1-] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_alt_text[confoverrides2-Bar] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_basic - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_no_image - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_two_images - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_primary_logo_is_light_when_no_default_mode - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_primary_logo_is_light_when_default_mode_is_set_to_auto - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_primary_logo_is_light_when_default_mode_is_light - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_primary_logo_is_dark_when_default_mode_is_dark - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_external_link - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_logo_external_image - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_align[content-klass0] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_align[left-klass1] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_align[right-klass2] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_no_in_page_headers - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_header_dropdown[0] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_header_dropdown[4] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_header_dropdown[8] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_header_dropdown_button[None] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_navbar_header_dropdown_button[Other] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_sidebars_captions - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_sidebars_nested_page - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_sidebars_level2 - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_sidebars_show_nav_level0 - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_included_toc - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_footer - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context0-edit_text_and_url0] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context1-edit_text_and_url1] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context2-edit_text_and_url2] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context3-edit_text_and_url3] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context4-edit_text_and_url4] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context5-edit_text_and_url5] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context9-edit_text_and_url9] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context11-edit_text_and_url11] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context12-edit_text_and_url12] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_edit_page_url[html_context13-edit_text_and_url13] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_analytics[provider0-tags0] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_analytics[provider1-tags1] - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_plausible - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_show_nav_level - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_version_switcher_error_states[missing_url.json] - assert 'WARNING: The...k to monokai.' == 'WARNING: The..."version" key' FAILED tests/test_build.py::test_theme_switcher - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_shorten_link - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_math_header_item - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_pygments_fallbacks[style_names1-keyword_colors1] - AssertionError: assert ['\x1b[91mWAR...1b[39;49;00m'] == [''] FAILED tests/test_build.py::test_deprecated_build_html - assert 7 == 5 FAILED tests/test_build.py::test_empty_templates - AssertionError: Running Sphinx v7.1.2 FAILED tests/test_build.py::test_translations - AssertionError: Running Sphinx v7.1.2 ========================================================================= 52 failed, 9 passed, 1 skipped in 20.55s ========================================================================== ```
12rambau commented 11 months ago

it seems you are missing 2 libs: playwrite and accessible-pygments.

Any reason why they are not installed ? playwrite is a dependency of the test suit and accessible-pygments is a chore dep of the lib.

12rambau commented 9 months ago

I don't manage to reproduce this issue with latest (v0.15.0rc0) I'll let you reopen another one if it doesn't work on your side.

kloczek commented 9 months ago

Did you try to reproduce that with 0.14.2? 🤔

12rambau commented 9 months ago

nope, I tried with latest. let me reopen this issue so that you comment don't remain unnoticed

drammock commented 9 months ago

it seems you are missing 2 libs: playwright and accessible-pygments.

@kloczek as we're not familiar with RPM packaging process, please help us out with more information as to how/why these aren't getting installed for you. I can imagine why playwright might not since it's under a separate a11y group of optional deps / wouldn't have been installed through pip install pydata-sphinx-theme[test], but I'm struggling to imagine how accessible-pygments failed to be in your build environment.

Other random question: why are you building 0.14.2 instead of the latest in that series (0.14.4)? (I know why you're not building 0.15.x --- it wasn't out yet when you opened the issue)

kloczek commented 8 months ago

@kloczek as we're not familiar with RPM packaging process,

Reported issue has nothing to do with rpm.

drammock commented 8 months ago

Reported issue has nothing to do with rpm.

Ok, well, can you answer any of the clarifying questions I've asked about why the environment is missing dependencies? Or why you're targeting 0.14.2 instead of 0.14.4?

trallard commented 3 months ago

Thank you for your issue!

We haven't gotten a response to our questions in our comment https://github.com/pydata/pydata-sphinx-theme/issues/1541#issuecomment-1913136467. With only the current information on the issue, we don't have enough information to take action. I'm going to close this, but don't hesitate to reach out if you have or find the answers we need. We'll be happy to reopen the issue.

kloczek commented 3 months ago

it seems you are missing 2 libs: playwright and accessible-pygments.

  • accessible-pygments has been a full dependency since 17eeb06 (since 0.13.0rc1)
  • pytest-playwright (which pulls in playwright) has been an optional dependency since cbebfc9 (since 0.14.0)

@kloczek as we're not familiar with RPM packaging process, please help us out with more information as to how/why these aren't getting installed for you. I can imagine why playwright might not since it's under a separate a11y group of optional deps / wouldn't have been installed through pip install pydata-sphinx-theme[test], but I'm struggling to imagine how accessible-pygments failed to be in your build environment.

Other random question: why are you building 0.14.2 instead of the latest in that series (0.14.4)? (I know why you're not building 0.15.x --- it wasn't out yet when you opened the issue)

Reported issue has nothing to do with rpm. Procedure used during packaging is described on top of this ticket.

In mean time I've migrated to python 3.10 and cannot build few jupyter python modules because loop in build dependencies reported in https://github.com/jupyterlab/jupyterlab_pygments/issues/40