Skip to content
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

4.0.0: Q about assertpy used in test suite #726

Open
kloczek opened this issue Sep 1, 2023 · 3 comments
Open

4.0.0: Q about assertpy used in test suite #726

kloczek opened this issue Sep 1, 2023 · 3 comments

Comments

@kloczek
Copy link

kloczek commented Sep 1, 2023

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? 🤔

@BeyondEvil
Copy link
Contributor

I have no idea about the status of it. I use it with great success in many projects both OS and professionally.

Once that type of library reaches maturity, you're not going to see very active work being done. Because what would that work entail?

With that said, I'm happy to discuss alternatives.

@kloczek
Copy link
Author

kloczek commented Sep 1, 2023

I'm not familiar about details of API which this module offers 😋 however on building its documentation I've noticed that it uses veeery old ``sphinxcontrib.napoleon which should be replaces by some modern module (sphinxcontrib.napoleon` was part os sphinx 3.x/4.x).

What about standard pytest assertions? 🤔
https://docs.pytest.org/en/7.1.x/how-to/assert.html

@BeyondEvil
Copy link
Contributor

BeyondEvil commented Sep 1, 2023

What about standard pytest assertions? 🤔 https://docs.pytest.org/en/7.1.x/how-to/assert.html

It's not nearly as rich as assertpy unfortunately.

Noticed that the author of assertpy hasn't made a single contribution to a single github project during 2023. This is obviously a bad sign. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants