Open
Description
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>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-seed-intersphinx-mapping-1.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-seed-intersphinx-mapping-1.1.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0
Test session started at 22:03:29
rootdir: /home/tkloczko/rpmbuild/BUILD/seed_intersphinx_mapping-1.1.0, configfile: tox.ini
plugins: datadir-1.4.1, regressions-2.4.1, timeout-2.1.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 26 items
tests/test_core.py .. [ 7%]
tests/test_integration.py F [ 11%]
tests/test_main.py . [ 15%]
tests/test_requirements_parsers.py ...... [ 38%]
tests/test_seeding.py ............... [ 96%]
tests/test_setup.py . [100%]
================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_integration _____________________________________________________________________________
the_app = <SphinxTestApp buildername='html'>
@pytest.mark.usefixtures("requirements")
def test_integration(the_app):
# app is a Sphinx application object for default sphinx project (`tests/doc-test/test-root`).
the_app.build()
domdf_python_tools_url = "https://domdf-python-tools.readthedocs.io/en/latest/"
> assert the_app.env.config.intersphinx_mapping == {
"domdf-python-tools": ("domdf-python-tools", (domdf_python_tools_url, (None, ))),
"packaging": ("packaging", ("https://packaging.pypa.io/en/latest/", (None, ))),
"requests": ("requests", ("https://requests.readthedocs.io/en/latest/", (None, ))),
"pandas": ("pandas", ("https://pandas.pydata.org/pandas-docs/stable/", (None, ))),
}
E AssertionError: assert {'domdf-pytho.../', (None,)))} == {'domdf-pytho.../', (None,)))}
E Omitting 3 identical items, use -vv to show
E Differing items:
E {'pandas': ('pandas', ('http://pandas.pydata.org/pandas-docs/stable/', (None,)))} != {'pandas': ('pandas', ('https://pandas.pydata.org/pandas-docs/stable/', (None,)))}
E Use -v to get more diff
tests/test_integration.py:26: AssertionError
-------------------------------------------------------------------------- Captured stderr setup ---------------------------------------------------------------------------
WARNING: Unable to determine documentation url for project appdirs
------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-459/root
# outdir: /tmp/pytest-of-tkloczko/pytest-459/root/_build/html
# status:
Running Sphinx v5.3.0
loading intersphinx inventory from https://domdf-python-tools.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://packaging.pypa.io/en/latest/objects.inv...
loading intersphinx inventory from http://pandas.pydata.org/pandas-docs/stable/objects.inv...
loading intersphinx inventory from https://requests.readthedocs.io/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index
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-459/root/_build/html.
# warning:
=========================================================================== slowest 25 durations ===========================================================================
4.55s call tests/test_core.py::test_get_sphinx_doc_url
3.53s setup tests/test_integration.py::test_integration
0.69s call tests/test_seeding.py::test_seed_intersphinx_mapping[domdf_python_tools>=0.4.8\npackaging>=20.4\nrequests>=2.24.0\nslumber>=0.7.1\nsphinx>=3.0.3\nnumpy>=1.22.0\nsphinxcontrib-domaintools==0.3\n-expects0]
0.35s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[example_requirements_a-flit]
0.35s call tests/test_seeding.py::test_seed_intersphinx_mapping_flit[domdf_python_tools>=0.4.8\npackaging>=20.4\nrequests>=2.24.0\nslumber>=0.7.1\nsphinx>=3.0.3\nnumpy>=1.22.0\nsphinxcontrib-domaintools==0.3\n-expects0]
0.35s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[example_requirements_a-pyproject.toml]
0.34s call tests/test_seeding.py::test_seed_intersphinx_mapping[domdf_python_tools>=0.4.8\npackaging>=20.4\n?==requests>=2.24.0\nslumber$$$$0.7.1\nsphinx>=3.0.3\nsphinxcontrib-domaintools==0.3\n-expects1]
0.34s call tests/test_seeding.py::test_seed_intersphinx_mapping_pyproject[domdf_python_tools>=0.4.8\npackaging>=20.4\nrequests>=2.24.0\nslumber>=0.7.1\nsphinx>=3.0.3\nnumpy>=1.22.0\nsphinxcontrib-domaintools==0.3\n-expects0]
0.33s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[example_requirements_a-requirements]
0.31s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[example_requirements_a-pyproject]
0.21s call tests/test_integration.py::test_integration
0.21s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_list_mocked
0.18s call tests/test_seeding.py::test_seed_intersphinx_mapping_pyproject[domdf_python_tools>=0.4.8\npackaging>=20.4\n?==requests>=2.24.0\nslumber$$$$0.7.1\nsphinx>=3.0.3\nsphinxcontrib-domaintools==0.3\n-expects1]
0.18s call tests/test_seeding.py::test_seed_intersphinx_mapping_flit[domdf_python_tools>=0.4.8\npackaging>=20.4\n?==requests>=2.24.0\nslumber$$$$0.7.1\nsphinx>=3.0.3\nsphinxcontrib-domaintools==0.3\n-expects1]
0.18s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-requirements]
0.18s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-flit]
0.17s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-pyproject.toml]
0.17s call tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-pyproject]
0.01s setup tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-flit]
0.01s setup tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[example_requirements_a-requirements]
0.01s setup tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-pyproject.toml]
0.01s setup tests/test_seeding.py::test_sphinx_seed_intersphinx_mapping_mocked[bad_example_requirements-pyproject]
(3 durations < 0.005s hidden. Use -vv to show these durations.)
========================================================================= short test summary info ==========================================================================
FAILED tests/test_integration.py::test_integration - AssertionError: assert {'domdf-pytho.../', (None,)))} == {'domdf-pytho.../', (None,)))}
====================================================================== 1 failed, 25 passed in 13.24s =======================================================================
Here is list of installed modules in build env
Package Version
----------------------------- -----------------
alabaster 0.7.12
apeye 1.2.0
appdirs 1.4.4
attrs 22.1.0
autodocsumm 0.2.9
Babel 2.11.0
beautifulsoup4 4.11.1
Brlapi 0.8.3
build 0.9.0
CacheControl 0.12.11
charset-normalizer 3.0.1
click 8.1.3
coincidence 0.6.2
consolekit 1.4.1
contourpy 1.0.6
cssselect 1.1.0
cssutils 2.6.0
cycler 0.11.0
deprecation 2.1.0
deprecation-alias 0.3.1
dict2css 0.3.0
dist-meta 0.6.0
distro 1.8.0
dnspython 2.2.1
docutils 0.19
dom_toml 0.6.0
domdf-python-tools 3.3.0
exceptiongroup 1.0.0
extras 1.0.0
extras-require 0.4.3
fixtures 4.0.0
fonttools 4.38.0
gpg 1.17.1-unknown
handy-archives 0.1.2
html5lib 1.1
idna 3.4
imagesize 1.4.1
importlib-metadata 5.1.0
iniconfig 1.1.1
Jinja2 3.1.2
kiwisolver 1.4.4
libcomps 0.1.19
lockfile 0.12.2
louis 3.23.0
lxml 4.9.1
MarkupSafe 2.1.1
matplotlib 3.6.2
mistletoe 0.9.0
msgpack 1.0.4
natsort 8.0.2
numpy 1.23.1
olefile 0.46
packaging 21.3
pbr 5.9.0
pep517 0.13.0
Pillow 9.3.0
pip 22.3.1
platformdirs 2.5.2
pluggy 1.0.0
Pygments 2.13.0
PyGObject 3.42.2
pyparsing 3.0.9
pypi-json 0.3.0
pyproject-parser 0.5.0
pytest 7.2.0
pytest-datadir 1.4.1
pytest-regressions 2.4.1
pytest-timeout 2.1.0
python-dateutil 2.8.2
pytz 2022.4
PyYAML 6.0
requests 2.28.1
rpm 4.17.0
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
scour 0.38.2
setuptools 65.6.3
shippinglabel 1.4.1
six 1.16.0
snowballstemmer 2.2.0
soupsieve 2.3.2.post1
Sphinx 5.3.0
sphinx_autodoc_typehints 1.19.4
sphinx-jinja2-compat 0.2.0
sphinx-prompt 1.4.0
sphinx-pyproject 0.1.0
sphinx-tabs 3.4.1
sphinx-toolbox 3.2.0
sphinxcontrib-applehelp 1.0.2.dev20221204
sphinxcontrib-devhelp 1.0.2.dev20221204
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20221204
sphinxcontrib-qthelp 1.0.3.dev20221204
sphinxcontrib-serializinghtml 1.1.5
tabulate 0.9.0
testtools 2.5.0
toml 0.10.2
tomli 2.0.1
typing_extensions 4.4.0
urllib3 1.26.12
webencodings 0.5.1
wheel 0.38.4
whey 0.0.23
zipp 3.11.0