Bug 2330154 - python-sphinx-tabs fails to build with sphinx 8.x: AssertionError: FILES DIFFER
Summary: python-sphinx-tabs fails to build with sphinx 8.x: AssertionError: FILES DIFFER
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sphinx-tabs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard Shaw
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: SPHINX8
TreeView+ depends on / blocked
 
Reported: 2024-12-03 12:58 UTC by Tomáš Hrnčiar
Modified: 2024-12-03 13:24 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-12-03 13:24:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-12-03 12:58:12 UTC
python-sphinx-tabs fails to build with sphinx 8.x in Fedora 42 (currently Rawhide).

The issue detected:

==================================== ERRORS ====================================
_________________________ ERROR at setup of test_basic _________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87ace2b100>
warning = <_io.StringIO object at 0x7f87ace2b1c0>
check_build_success = <function check_build_success.<locals>.check at 0x7f87ac036200>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87ac036840>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87ac070680>
request = <SubRequest 'auto_build_and_check' for <Function test_basic>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_basic0/test_build/test_basic.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_basic0/test_build/test_basic.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_basic0/test_build/test_basic.obtained.diff.html
E       --- 
E       +++ 
E       @@ -37,6 +37,8 @@
E             </p>
E            </div>
E           </div>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
________________________ ERROR at setup of test_no_tabs ________________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abfb3280>
warning = <_io.StringIO object at 0x7f87abfb3b80>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abf5cd60>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abf5cfe0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abf5c860>
request = <SubRequest 'auto_build_and_check' for <Function test_no_tabs>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_no_tabs0/test_build/test_no_tabs.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_no_tabs0/test_build/test_no_tabs.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_no_tabs0/test_build/test_no_tabs.obtained.diff.html
E       --- 
E       +++ 
E       @@ -4,6 +4,8 @@
E           <p>
E            There are no tabs here
E           </p>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
_______________ ERROR at setup of test_conditional_assets[index] _______________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abfb3880>
warning = <_io.StringIO object at 0x7f87abfb1fc0>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abec8e00>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abec94e0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abec9620>
request = <SubRequest 'auto_build_and_check' for <Function test_conditional_assets[index]>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_index_0/test_build/test_conditional_assets_index_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_index_0/test_build/test_conditional_assets_index_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_index_0/test_build/test_conditional_assets_index_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
_____________ ERROR at setup of test_conditional_assets[no_tabs1] ______________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abdd1240>
warning = <_io.StringIO object at 0x7f87abdd1480>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abcfb240>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abcfb380>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abcfb600>
request = <SubRequest 'auto_build_and_check' for <Function test_conditional_assets[no_tabs1]>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab0/test_build/test_conditional_assets_no_tabs1_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab0/test_build/test_conditional_assets_no_tabs1_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab0/test_build/test_conditional_assets_no_tabs1_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
_____________ ERROR at setup of test_conditional_assets[no_tabs2] ______________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abd681c0>
warning = <_io.StringIO object at 0x7f87abd68100>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abcfb420>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abcfb560>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abcfb920>
request = <SubRequest 'auto_build_and_check' for <Function test_conditional_assets[no_tabs2]>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab1/test_build/test_conditional_assets_no_tabs2_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab1/test_build/test_conditional_assets_no_tabs2_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_no_tab1/test_build/test_conditional_assets_no_tabs2_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
___________________ ERROR at setup of test_other_with_assets ___________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abdd3880>
warning = <_io.StringIO object at 0x7f87abc359c0>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abbb6520>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abbb6660>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abbb68e0>
request = <SubRequest 'auto_build_and_check' for <Function test_other_with_assets>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_other_with_assets0/test_build/test_other_with_assets.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_other_with_assets0/test_build/test_other_with_assets.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_other_with_assets0/test_build/test_other_with_assets.obtained.diff.html
E       --- 
E       +++ 
E       @@ -19,6 +19,8 @@
E             </div>
E            </div>
E           </div>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
_____________________ ERROR at setup of test_nested_markup _____________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abc37a00>
warning = <_io.StringIO object at 0x7f87abc374c0>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abbb4900>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abecb100>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abcfb4c0>
request = <SubRequest 'auto_build_and_check' for <Function test_nested_markup>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_nested_markup0/test_build/test_nested_markup.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_nested_markup0/test_build/test_nested_markup.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_nested_markup0/test_build/test_nested_markup.obtained.diff.html
E       --- 
E       +++ 
E       @@ -207,6 +207,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
_____________________ ERROR at setup of test_custom_lexer ______________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abdd0f40>
warning = <_io.StringIO object at 0x7f87abdd0d00>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abb32520>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abb32660>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abb32d40>
request = <SubRequest 'auto_build_and_check' for <Function test_custom_lexer>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_custom_lexer0/test_build/test_custom_lexer.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_custom_lexer0/test_build/test_custom_lexer.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_custom_lexer0/test_build/test_custom_lexer.obtained.diff.html
E       --- 
E       +++ 
E       @@ -19,6 +19,8 @@
E             </div>
E            </div>
E           </div>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
____________________ ERROR at setup of test_disable_closing ____________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abd68ac0>
warning = <_io.StringIO object at 0x7f87abd6b7c0>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abb11260>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abb111c0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abb11300>
request = <SubRequest 'auto_build_and_check' for <Function test_disable_closing>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_disable_closing0/test_build/test_disable_closing.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_disable_closing0/test_build/test_disable_closing.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_disable_closing0/test_build/test_disable_closing.obtained.diff.html
E       --- 
E       +++ 
E       @@ -37,6 +37,8 @@
E             </p>
E            </div>
E           </div>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
__________________ ERROR at setup of test_disable_css_loading __________________

app = <SphinxTestApp buildername='html'>
status = <_io.StringIO object at 0x7f87abb6c280>
warning = <_io.StringIO object at 0x7f87abb6cb80>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abb4e020>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abb4df80>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abb4dd00>
request = <SubRequest 'auto_build_and_check' for <Function test_disable_css_loading>>

    @pytest.fixture(autouse=True)
    def auto_build_and_check(
        app,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        request,
    ):
        """
        Build and check build success and output regressions.
        Currently all tests start with this.
        Disable using a `noautobuild` mark.
        """
        if "noautobuild" in request.keywords:
            return
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/conftest.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_disable_css_loading0/test_build/test_disable_css_loading.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_disable_css_loading0/test_build/test_disable_css_loading.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_disable_css_loading0/test_build/test_disable_css_loading.obtained.diff.html
E       --- 
E       +++ 
E       @@ -37,6 +37,8 @@
E             </p>
E            </div>
E           </div>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
=================================== FAILURES ===================================
______________ test_conditional_assets_html_assets_policy[index] _______________

app = <SphinxTestApp buildername='html'>, docname = 'index'
status = <_io.StringIO object at 0x7f87abd693c0>
warning = <_io.StringIO object at 0x7f87abd68280>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abbec040>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abbec0e0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abbec400>
check_asset_links = <function check_asset_links.<locals>.check at 0x7f87abbec4a0>

    @pytest.mark.noautobuild
    @pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
    @pytest.mark.sphinx(testroot="conditionalassets-policy")
    def test_conditional_assets_html_assets_policy(
        app,
        docname,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        check_asset_links,
    ):
        app.set_html_assets_policy("always")
    
        # Following lines are copied from ``auto_build_and_check`` since we need to
        # set a config in the build object before auto build. Because of this, we
        # need to use ``noautobuild``.
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/test_build.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a0/test_build/test_conditional_assets_html_assets_policy_index_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a0/test_build/test_conditional_assets_html_assets_policy_index_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a0/test_build/test_conditional_assets_html_assets_policy_index_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy
# outdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 3 source files that are out of date
updating environment: [new config] 3 added, 0 changed, 0 removed
reading sources... [ 33%] index
reading sources... [ 67%] no_tabs1
reading sources... [100%] no_tabs2

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html/_static/basic.css
Writing evaluated template result to /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html/_static/documentation_options.js
Writing evaluated template result to /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html/_static/language_data.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [ 33%] index
writing output... [ 67%] no_tabs1
writing output... [100%] no_tabs2

generating indices... genindex done
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in ../../../../../tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html.

# warning: 

_____________ test_conditional_assets_html_assets_policy[no_tabs1] _____________

app = <SphinxTestApp buildername='html'>, docname = 'no_tabs1'
status = <_io.StringIO object at 0x7f87abd69480>
warning = <_io.StringIO object at 0x7f87abd69540>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abbef740>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abbef9c0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abbefce0>
check_asset_links = <function check_asset_links.<locals>.check at 0x7f87abbee3e0>

    @pytest.mark.noautobuild
    @pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
    @pytest.mark.sphinx(testroot="conditionalassets-policy")
    def test_conditional_assets_html_assets_policy(
        app,
        docname,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        check_asset_links,
    ):
        app.set_html_assets_policy("always")
    
        # Following lines are copied from ``auto_build_and_check`` since we need to
        # set a config in the build object before auto build. Because of this, we
        # need to use ``noautobuild``.
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/test_build.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a1/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a1/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a1/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy
# outdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
loading pickled environment... The configuration has changed (2 options: 'html_static_path', 'html_theme')
done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
reading sources... 
looking for now-outdated files... none found
no targets are out of date.
build succeeded.

The HTML pages are in ../../../../../tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html.

# warning: 

_____________ test_conditional_assets_html_assets_policy[no_tabs2] _____________

app = <SphinxTestApp buildername='html'>, docname = 'no_tabs2'
status = <_io.StringIO object at 0x7f87abdd2bc0>
warning = <_io.StringIO object at 0x7f87abdd3940>
check_build_success = <function check_build_success.<locals>.check at 0x7f87abbeeac0>
get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f87abbb4040>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f87abbb4400>
check_asset_links = <function check_asset_links.<locals>.check at 0x7f87abbb44a0>

    @pytest.mark.noautobuild
    @pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
    @pytest.mark.sphinx(testroot="conditionalassets-policy")
    def test_conditional_assets_html_assets_policy(
        app,
        docname,
        status,
        warning,
        check_build_success,
        get_sphinx_app_doctree,
        regress_sphinx_app_output,
        check_asset_links,
    ):
        app.set_html_assets_policy("always")
    
        # Following lines are copied from ``auto_build_and_check`` since we need to
        # set a config in the build object before auto build. Because of this, we
        # need to use ``noautobuild``.
        app.build()
        check_build_success(status, warning)
        get_sphinx_app_doctree(app, regress=True)
>       regress_sphinx_app_output(app)

tests/test_build.py:49: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

app = <SphinxTestApp buildername='html'>, buildername = 'html'
filename = 'index.html', encoding = 'utf-8'

    def read(app, buildername="html", filename="index.html", encoding="utf-8"):
        content = get_sphinx_app_output(app, buildername, filename, encoding)
    
        if buildername == "html":
            soup = BeautifulSoup(content, "html.parser")
    
            # Remove output from ``pygments``, so that test only compares HTML of surrounding tabs
            for div in soup.find_all("div", {"class": "highlight"}):
                div.decompose()
    
            doc_div = soup.findAll("div", {"class": "documentwrapper"})[0]
            doc = doc_div.prettify()
    
        else:
            doc = content
>       file_regression.check(
            doc, extension="." + filename.split(".")[-1], encoding="utf8"
        )
E       AssertionError: FILES DIFFER:
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a2/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html
E       /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a2/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.obtained.html
E       HTML DIFF: /tmp/pytest-of-mockbuild/pytest-0/test_conditional_assets_html_a2/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.obtained.diff.html
E       --- 
E       +++ 
E       @@ -243,6 +243,8 @@
E             </div>
E            </div>
E           </section>
E       +   <div class="clearer">
E       +   </div>
E          </div>
E         </div>
E        </div>

tests/conftest.py:99: AssertionError
--------------------------- Captured stdout teardown ---------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy
# outdir: /tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html
# status: 
Running Sphinx v8.1.3
loading translations [en]... done
Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`.
loading pickled environment... The configuration has changed (2 options: 'html_static_path', 'html_theme')
done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
reading sources... 
looking for now-outdated files... none found
no targets are out of date.
build succeeded.

The HTML pages are in ../../../../../tmp/pytest-of-mockbuild/pytest-0/conditionalassets-policy/_build/html.

# warning: 

=========================== short test summary info ============================
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[index]
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs1]
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs2]
ERROR tests/test_build.py::test_basic - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_no_tabs - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_conditional_assets[index] - AssertionError: F...
ERROR tests/test_build.py::test_conditional_assets[no_tabs1] - AssertionError...
ERROR tests/test_build.py::test_conditional_assets[no_tabs2] - AssertionError...
ERROR tests/test_build.py::test_other_with_assets - AssertionError: FILES DIF...
ERROR tests/test_build.py::test_nested_markup - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_custom_lexer - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_disable_closing - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_disable_css_loading - AssertionError: FILES D...
================== 3 failed, 1 deselected, 10 errors in 1.93s ==================

Please work with upstream on this issue, I plan to ship sphinx 8 in two weeks.


For the logs from testing build attempts, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/python-sphinx/package/python-sphinx-tabs/

You can test you package in mock running:

$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ --no-clean your.src.rpm
$ mock -r fedora-rawhide-x86_64
--addrepo=https://download.copr.fedorainfracloud.org/results/thrnciar/python-sphinx/fedora-rawhide-x86_64/ shell

We'd like to include Sphinx 8 in Fedora 42.
Let us know here if you have any questions. Thank you!

Comment 1 Richard Shaw 2024-12-03 13:19:16 UTC
In the future it would be preferable to put such long output in an attachment. It makes this BZ somewhat unwieldy, but it looks like upstream already has a PR addressing the issue so it shouldn't be open long.

Comment 2 Richard Shaw 2024-12-03 13:24:09 UTC
Upstream PR solved the issue and has been committed/pushed to Rawhide. Rebuild when you are ready.


Note You need to log in before you can comment on or make changes to this bug.