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>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
I'm not sure but probably extras-require needs to be updated fro sphinx 5.x.
Here is pytest output:
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_flit_demo_html_0/test_directive_/test_output_flit_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_flit_demo_html_0/test_directive_/test_output_flit_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_flit_demo_html_0/test_directive_/test_output_flit_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E flit Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
______________________________________________________________________ test_output[scopes_demo.html] _______________________________________________________________________
page =
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_scopes_demo_html_0/test_directive_/test_output_scopes_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_scopes_demo_html_0/test_directive_/test_output_scopes_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_scopes_demo_html_0/test_directive_/test_output_scopes_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E Scopes Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
_____________________________________________________________________ test_output[setup_cfg_demo.html] _____________________________________________________________________
page =
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_setup_cfg_demo_htm0/test_directive_/test_output_setup_cfg_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_setup_cfg_demo_htm0/test_directive_/test_output_setup_cfg_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_setup_cfg_demo_htm0/test_directive_/test_output_setup_cfg_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E setup.cfg Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
_________________________________________________________________ test_output[requirements_file_demo.html] _________________________________________________________________
page =
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_requirements_file_0/test_directive_/test_output_requirements_file_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_requirements_file_0/test_directive_/test_output_requirements_file_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_requirements_file_0/test_directive_/test_output_requirements_file_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E requirements.txt Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
______________________________________________________________________ test_output[pkginfo_demo.html] ______________________________________________________________________
page =
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_pkginfo_demo_html_0/test_directive_/test_output_pkginfo_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_pkginfo_demo_html_0/test_directive_/test_output_pkginfo_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_pkginfo_demo_html_0/test_directive_/test_output_pkginfo_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E __pkginfo__ Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
______________________________________________________________________ test_output[manual_demo.html] _______________________________________________________________________
page =
html_regression =
@pytest.mark.parametrize(
"page",
[
"flit_demo.html",
"scopes_demo.html",
"setup_cfg_demo.html",
"requirements_file_demo.html",
"pkginfo_demo.html",
"manual_demo.html",
],
indirect=True
)
def test_output(page: BeautifulSoup, html_regression: HTMLRegressionFixture) -> None:
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_output_manual_demo_html_0/test_directive_/test_output_manual_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_output_manual_demo_html_0/test_directive_/test_output_manual_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_output_manual_demo_html_0/test_directive_/test_output_manual_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E Manual Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
tests/test_directive.py:234: AssertionError
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-83/root
# outdir: /tmp/pytest-of-tkloczko/pytest-83/root/_build/html
# status:
Running Sphinx v5.1.1
loading pickled environment... done
building [mo]: all of 0 po files
building [html]: all source files
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files... none found
preparing documents... done
writing output... [100%] setup_cfg_demo
generating indices... genindex done
writing additional pages... search done
copying static files... done
copying extra files... 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-83/root/_build/html.
# warning:
___________________________________________________________ test_no_requirements_demo[no_requirements_demo.html] ___________________________________________________________
page =
html_regression =
@pytest.mark.parametrize("page", ["no_requirements_demo.html"], indirect=True)
def test_no_requirements_demo(
page: BeautifulSoup,
html_regression: HTMLRegressionFixture,
) -> None:
# Make sure the page title is what you expect
title = page.find("h1").contents[0].strip()
assert "No Requirements Demo" == title
# Now test the directive
for div in page.findAll("div"):
assert not div.get("id", '').startswith("extras_require")
> html_regression.check(page, jinja2=True)
E AssertionError: FILES DIFFER:
E /tmp/pytest-of-tkloczko/pytest-83/test_no_requirements_demo_no_r0/test_directive_/test_no_requirements_demo_no_requirements_demo_html_.html
E /tmp/pytest-of-tkloczko/pytest-83/test_no_requirements_demo_no_r0/test_directive_/test_no_requirements_demo_no_requirements_demo_html_.obtained.html
E HTML DIFF: /tmp/pytest-of-tkloczko/pytest-83/test_no_requirements_demo_no_r0/test_directive_/test_no_requirements_demo_no_requirements_demo_html_.obtained.diff.html
E ---
E +++
E @@ -1,9 +1,9 @@
E
E -
E +
E
E
E
E -
E +
E
E No Requirements Demo — Python documentation
E
E @@ -12,6 +12,8 @@
E
E
E +
E
E @@ -25,7 +27,7 @@
E
E
Looks like now with sphinx 7.2.6 pytest fails on deprecation error:
+ /usr/bin/pytest -ra -m 'not network'
ImportError while loading conftest '/home/tkloczko/rpmbuild/BUILD/extras_require-0.5.0/tests/conftest.py'.
tests/conftest.py:17: in <module>
from sphinx.testing.path import path
/usr/lib/python3.10/site-packages/sphinx/testing/path.py:14: in <module>
warnings.warn("'sphinx.testing.path' is deprecated. "
E sphinx.deprecation.RemovedInSphinx90Warning: 'sphinx.testing.path' is deprecated. Use 'os.path' or 'pathlib' instead.
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
build
with--no-isolation
I'm using during all processes only locally installed modulesI'm not sure but probably
extras-require
needs to be updated frosphinx
5.x. Here is pytest output: