Skip to content

0.8: pytest is failing #19

@kloczek

Description

@kloczek

I'm trying to package 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 usinh 0.8 + commits from master
  • Looks like latest pytest fails on collecting units.

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-repoze-sphinx-autointerface-0.8-23.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-repoze-sphinx-autointerface-0.8-23.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --import-mode=importlib
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/repoze.sphinx.autointerface-0.8
plugins: asyncio-0.18.2
asyncio: mode=legacy
collected 0 items / 1 error

================================================================================== ERRORS ==================================================================================
________________________________________________________ ERROR collecting repoze/sphinx/tests/test_autointerface.py ________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/repoze.sphinx.autointerface-0.8/repoze/sphinx/tests/test_autointerface.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
repoze/sphinx/tests/test_autointerface.py:3: in <module>
    from repoze.sphinx.tests.util import TestApp
../../BUILDROOT/python-repoze-sphinx-autointerface-0.8-23.fc35.x86_64/usr/lib/python3.8/site-packages/repoze/sphinx/tests/util.py:11: in <module>
    from sphinx.ext.autodoc import AutoDirective
E   ImportError: cannot import name 'AutoDirective' from 'sphinx.ext.autodoc' (/usr/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py)
============================================================================= warnings summary =============================================================================
../../../../../usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191
  /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:191: DeprecationWarning: The 'asyncio_mode' default value will change to 'strict' in future, please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest configuration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
ERROR repoze/sphinx/tests/test_autointerface.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 warning, 1 error in 0.30s ========================================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions