-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.5.0: pytest is failing in tests/test_render.py::test_sphinx_build_directives
unit
#43
Comments
Just retested wit latest pytest 8.1.1 and sphinx 7.2.1 and now pytest fails like below Here is pytest output:+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-autodoc2-0.5.0-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-autodoc2-0.5.0-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-autodoc2-0.5.0
configfile: pyproject.toml
testpaths: tests
plugins: mock-3.12.0, hypothesis-6.99.5, datadir-1.5.0, regressions-2.5.0
collected 38 items / 1 error
========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR collecting tests/test_render.py ___________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/sphinx-autodoc2-0.5.0/tests/test_render.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.9/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_render.py:15: in <module>
from sphinx.testing.util import path as sphinx_path
E ImportError: cannot import name 'path' from 'sphinx.testing.util' (/usr/lib/python3.9/site-packages/sphinx/testing/util.py)
================================================================================== short test summary info ==================================================================================
ERROR tests/test_render.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 error in 0.99s ====================================================================================== After add tests/test_render.py to --ignore list rest of the test suite seems is OK. |
sphinx = ["sphinx>=4.0.0"]
testing = [
"pytest",
"pytest-regressions",
"pytest-cov",
"sphinx>=4.0.0,<7",
] autodoc proper depends on Sphinx >= 4.0.0, but the test dependency has a tighter bound, also being < 7. Ignoring doesn't seem to work in my case, as other tests begin to fail when doing so. |
At the moment use anything than >=7 does not make any sense because any older version of the sphinx is no longer maintained. |
I agree. This is a dependency for another rpm I need to package, so I'd like to see a real resolution of some sort rather than using an old version. Hoping to have some time toon to work on a patch, but it sure doesn't look fun after reading the test src |
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 modulescut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
List of installed modules in build env:
The text was updated successfully, but these errors were encountered: