pytest-dev / pytest-dev/pytest-html

4.0.0: Q about `assertpy` used in test suite

Open
#726 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
779
Forks
260
PR merge metrics
No merged PRs in 30d

Description

Just started upgrade my rpm package to 4..0.0 and notices that it uses now assertpy

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-html-4.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-html-4.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.0, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-html-4.0.0
configfile: tox.ini
testpaths: testing
plugins: html-4.0.0
collected 0 items / 3 errors

========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________________ ERROR collecting testing/test_e2e.py ____________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/pytest-html-4.0.0/testing/test_e2e.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
testing/test_e2e.py:8: in <module>
    from assertpy import assert_that
E   ModuleNotFoundError: No module named 'assertpy'
_______________________________________________________________________ ERROR collecting testing/test_integration.py ________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/pytest-html-4.0.0/testing/test_integration.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
testing/test_integration.py:12: in <module>
    from assertpy import assert_that
E   ModuleNotFoundError: No module named 'assertpy'
___________________________________________________________________________ ERROR collecting testing/test_unit.py ___________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/pytest-html-4.0.0/testing/test_unit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
testing/test_unit.py:7: in <module>
    from assertpy import assert_that
E   ModuleNotFoundError: No module named 'assertpy'
===================================================================================== warnings summary ======================================================================================
testing/test_unit.py:5
  /home/tkloczko/rpmbuild/BUILD/pytest-html-4.0.0/testing/test_unit.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================== short test summary info ==================================================================================
ERROR testing/test_e2e.py
ERROR testing/test_integration.py
ERROR testing/test_unit.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 4 warnings, 3 errors in 0.26s ===============================================================================

which seems had no new version since 2020 https://github.com/assertpy/assertpy/tags

If I'm trying to use correct assertpy does it make sense to use module which is not well maintained? 🤔

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported pytest collection failure with pytest -ra -m 'not network', then read the imports in testing/test_e2e.py, testing/test_integration.py, and testing/test_unit.py. Determine how the test suite should handle the missing assertpy dependency and confirm that all three test modules collect successfully with the chosen approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.