Open
Description
Describe the bug
Looks like pytest fails with FILES DIFFER
errors.
Reproduce the bug
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.
python3 -sBm build -w --no-isolation
- because I'm calling
build
with--no-isolation
I'm using during all processes only locally installed modules - install .whl file in </install/prefix> using
installer
module - run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
- build is performed in env which is
cut off from access to the public network
(pytest is executed with-m "not network"
)
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-tabs-3.4.7-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-tabs-3.4.7-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network' --deselect tests/test_build.py::test_rinohtype_pdf
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-tabs-3.4.7
plugins: datadir-1.5.0, regressions-2.5.0
collected 14 items / 1 deselected / 13 selected
tests/test_build.py EEEEEFFFEEEEE [100%]
========================================================================================== ERRORS ===========================================================================================
_______________________________________________________________________________ ERROR at setup of test_basic ________________________________________________________________________________
app = <SphinxTestApp buildername='html'>, status = <_io.StringIO object at 0x7f4f63c33880>, warning = <_io.StringIO object at 0x7f4f63c33910>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f6306add0>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f6306ae60>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f630bcb80>, 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-tkloczko/pytest-46/test_basic0/test_build/test_basic.html
E /tmp/pytest-of-tkloczko/pytest-46/test_basic0/test_build/test_basic.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62fdc430>, warning = <_io.StringIO object at 0x7f4f62fdc310>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62fde320>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62fde290>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62fde440>, 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-tkloczko/pytest-46/test_no_tabs0/test_build/test_no_tabs.html
E /tmp/pytest-of-tkloczko/pytest-46/test_no_tabs0/test_build/test_no_tabs.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62fdf760>, warning = <_io.StringIO object at 0x7f4f62fdf880>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62e856c0>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62e85630>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62e857e0>, 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-tkloczko/pytest-46/test_conditional_assets_index_0/test_build/test_conditional_assets_index_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_index_0/test_build/test_conditional_assets_index_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62d475b0>, warning = <_io.StringIO object at 0x7f4f62d47ac0>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62da88b0>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62da8700>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62da89d0>
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-tkloczko/pytest-46/test_conditional_assets_no_tab0/test_build/test_conditional_assets_no_tabs1_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_no_tab0/test_build/test_conditional_assets_no_tabs1_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62e852d0>, warning = <_io.StringIO object at 0x7f4f62e85630>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62da9990>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62da97e0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62da9ab0>
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-tkloczko/pytest-46/test_conditional_assets_no_tab1/test_build/test_conditional_assets_no_tabs2_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_no_tab1/test_build/test_conditional_assets_no_tabs2_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62947ac0>, warning = <_io.StringIO object at 0x7f4f62947910>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62898d30>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62898ca0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62898e50>, 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-tkloczko/pytest-46/test_other_with_assets0/test_build/test_other_with_assets.html
E /tmp/pytest-of-tkloczko/pytest-46/test_other_with_assets0/test_build/test_other_with_assets.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f6289be20>, warning = <_io.StringIO object at 0x7f4f6289b520>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62898940>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62898dc0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f6289a4d0>, 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-tkloczko/pytest-46/test_nested_markup0/test_build/test_nested_markup.html
E /tmp/pytest-of-tkloczko/pytest-46/test_nested_markup0/test_build/test_nested_markup.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62947b50>, warning = <_io.StringIO object at 0x7f4f62947d90>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62944dc0>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62945fc0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62945f30>, 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-tkloczko/pytest-46/test_custom_lexer0/test_build/test_custom_lexer.html
E /tmp/pytest-of-tkloczko/pytest-46/test_custom_lexer0/test_build/test_custom_lexer.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62947a30>, warning = <_io.StringIO object at 0x7f4f62945990>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62da8c10>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62da9240>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62da8ee0>, 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-tkloczko/pytest-46/test_disable_closing0/test_build/test_disable_closing.html
E /tmp/pytest-of-tkloczko/pytest-46/test_disable_closing0/test_build/test_disable_closing.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62da8d30>, warning = <_io.StringIO object at 0x7f4f62da8280>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62d457e0>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62d45bd0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62d45480>, 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-tkloczko/pytest-46/test_disable_css_loading0/test_build/test_disable_css_loading.html
E /tmp/pytest-of-tkloczko/pytest-46/test_disable_css_loading0/test_build/test_disable_css_loading.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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 0x7f4f62da95a0>, warning = <_io.StringIO object at 0x7f4f62da8940>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62daaa70>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62daa9e0>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62daab90>, check_asset_links = <function check_asset_links.<locals>.check at 0x7f4f62daac20>
@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-tkloczko/pytest-46/test_conditional_assets_html_a0/test_build/test_conditional_assets_html_assets_policy_index_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_html_a0/test_build/test_conditional_assets_html_assets_policy_index_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/conditionalassets-policy
# outdir: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/conditionalassets-policy/_build/html/_static/basic.css
Writing evaluated template result to /tmp/pytest-of-tkloczko/pytest-46/conditionalassets-policy/_build/html/_static/documentation_options.js
Writing evaluated template result to /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/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 0x7f4f62dabeb0>, warning = <_io.StringIO object at 0x7f4f62da9a20>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62945090>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62946320>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62945630>, check_asset_links = <function check_asset_links.<locals>.check at 0x7f4f629455a0>
@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-tkloczko/pytest-46/test_conditional_assets_html_a1/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_html_a1/test_build/test_conditional_assets_html_assets_policy_no_tabs1_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/conditionalassets-policy
# outdir: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/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 0x7f4f629463b0>, warning = <_io.StringIO object at 0x7f4f62946830>
check_build_success = <function check_build_success.<locals>.check at 0x7f4f62947640>, get_sphinx_app_doctree = <function get_sphinx_app_doctree.<locals>.read at 0x7f4f62947490>
regress_sphinx_app_output = <function regress_sphinx_app_output.<locals>.read at 0x7f4f62947760>, check_asset_links = <function check_asset_links.<locals>.check at 0x7f4f629477f0>
@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-tkloczko/pytest-46/test_conditional_assets_html_a2/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.html
E /tmp/pytest-of-tkloczko/pytest-46/test_conditional_assets_html_a2/test_build/test_conditional_assets_html_assets_policy_no_tabs2_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/conditionalassets-policy
# outdir: /tmp/pytest-of-tkloczko/pytest-46/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-tkloczko/pytest-46/conditionalassets-policy/_build/html.
# warning:
================================================================================== short test summary info ==================================================================================
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: FILES DIFFER:
ERROR tests/test_build.py::test_conditional_assets[no_tabs1] - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_conditional_assets[no_tabs2] - AssertionError: FILES DIFFER:
ERROR tests/test_build.py::test_other_with_assets - AssertionError: FILES DIFFER:
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 DIFFER:
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[index] - AssertionError: FILES DIFFER:
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs1] - AssertionError: FILES DIFFER:
FAILED tests/test_build.py::test_conditional_assets_html_assets_policy[no_tabs2] - AssertionError: FILES DIFFER:
======================================================================== 3 failed, 1 deselected, 10 errors in 2.66s =========================================================================
Please let me know if you need more details or want me to perform some diagnostics.
List your environment
List of installed modules in build env:
Package Version
----------------------------- -----------
alabaster 0.7.16
babel 2.16.0
beautifulsoup4 4.12.3
build 1.2.2.post1
charset-normalizer 3.4.0
defusedxml 0.7.1
distro 1.9.0
docutils 0.21.2
exceptiongroup 1.1.3
imagesize 1.4.1
importlib_metadata 8.5.0
iniconfig 2.0.0
installer 0.7.0
Jinja2 3.1.4
MarkupSafe 3.0.2
packaging 24.0
pluggy 1.5.0
Pygments 2.18.0
pyproject_hooks 1.2.0
pytest 8.2.2
pytest-datadir 1.5.0
pytest-regressions 2.5.0
python-dateutil 2.9.0.post0
PyYAML 6.0.2
requests 2.32.3
setuptools 75.1.0
snowballstemmer 2.2.0
soupsieve 2.6
Sphinx 8.1.3
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 1.0.6
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
tokenize_rt 6.1.0
tomli 2.0.1
urllib3 2.2.2
wheel 0.45.0
zipp 3.20.2