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:
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-notfound-page-1.0.4-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-notfound-page-1.0.4-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-notfound-page-1.0.4
configfile: pytest.ini
collected 21 items
tests/test_urls.py ...F..FF.F...F.FFF... [100%]
=================================== FAILURES ===================================
____________________________ test_default_settings _____________________________
app =
status = <_io.StringIO object at 0x7f0899175a20>
warning = <_io.StringIO object at 0x7f0899175b40>
@pytest.mark.sphinx(srcdir=srcdir)
def test_default_settings(app, status, warning):
app.build()
path = app.outdir / '404.html'
assert path.exists()
content = path.read_text()
if sphinx.version_info < (6, 0):
cssclass = "shortcut "
else:
cssclass = ""
if sphinx.version_info < (7, 3):
alt = "Logo"
else:
alt = "Logo of Python"
chunks = [
'
Page not found
',
"Unfortunately we couldn't find the content you were looking for.",
'Page not found — Python documentation',
# favicon and logo
f'',
f'',
# sidebar URLs
'
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 modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-notfound-page-1.0.4-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-notfound-page-1.0.4-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.2.2, pluggy-1.5.0 rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-notfound-page-1.0.4 configfile: pytest.ini collected 21 items tests/test_urls.py ...F..FF.F...F.FFF... [100%] =================================== FAILURES =================================== ____________________________ test_default_settings _____________________________ app =Page not found
', "Unfortunately we couldn't find the content you were looking for.", 'Python
', 'Python
', '