5.0.0: test suite uses `case` module which i no longer maintained
case uses in testing nose which should not be used with python 3.x
https://nose.readthedocs.io/en/latest/
https://pypi.org/project/case/#history
Looks like some replacement needs to be found because that module is not suited for python 3.x.
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/vine-5.0.0, configfile: setup.cfg, testpaths: t/unit/
plugins: asyncio-0.16.0, mock-3.6.1, toolbox-0.5, cov-3.0.0
collected 2 items / 3 errors
================================================================================== ERRORS ==================================================================================
_________________________________________________________________ ERROR collecting t/unit/test_funtools.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/vine-5.0.0/t/unit/test_funtools.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)
t/unit/test_funtools.py:3: in <module>
from case import Mock
E ModuleNotFoundError: No module named 'case'
_________________________________________________________________ ERROR collecting t/unit/test_promises.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/vine-5.0.0/t/unit/test_promises.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)
t/unit/test_promises.py:9: in <module>
from case import Mock
E ModuleNotFoundError: No module named 'case'
_____________________________________________________________ ERROR collecting t/unit/test_synchronization.py ______________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/vine-5.0.0/t/unit/test_synchronization.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)
t/unit/test_synchronization.py:3: in <module>
from case import Mock
E ModuleNotFoundError: No module named 'case'
========================================================================= short test summary info ==========================================================================
ERROR t/unit/test_funtools.py
ERROR t/unit/test_promises.py
ERROR t/unit/test_synchronization.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 3 errors in 0.21s =============================================================================
``
although we get rid of case from some packages, still some package use case, so in coming weeks I will clean case up and push for a python 3 only release. and also work on getting rid of case gradually
nose2 or pytest would be best
pytest would IMO better as it has really a lot of additional plugins :) I've temporary added to --ignore list those three files from test suite so no rush.
Thank you :)
yeah pytest for sure
on development main branch I can not find all these, I can see import from unittest module
https://github.com/celery/vine/pull/38/files
Can you make a new release, please?
yes today!
Just tested 5.1.0. Here is result.
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-vine-5.1.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-vine-5.1.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.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/vine-5.1.0
configfile: setup.cfg
testpaths: t/unit/
collected 42 items
t/unit/test_abstract.py .. [ 4%]
t/unit/test_funtools.py ......... [ 26%]
t/unit/test_promises.py ........................... [ 90%]
t/unit/test_synchronization.py .... [100%]
=============================== warnings summary ===============================
t/unit/test_synchronization.py::test_barrier::test_evaluate
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
t/unit/test_synchronization.py::test_barrier::test_evaluate is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
t/unit/test_synchronization.py::test_barrier::test_reverse
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
t/unit/test_synchronization.py::test_barrier::test_reverse is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
t/unit/test_synchronization.py::test_barrier::test_cancel
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
t/unit/test_synchronization.py::test_barrier::test_cancel is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
t/unit/test_synchronization.py::test_barrier::test_throw
/usr/lib/python3.8/site-packages/_pytest/fixtures.py:895: PytestRemovedIn8Warning: Support for nose tests is deprecated and will be removed in a future release.
t/unit/test_synchronization.py::test_barrier::test_throw is using nose-specific method: `setup(self)`
To remove this warning, rename it to `setup_method(self)`
See docs: https://docs.pytest.org/en/stable/deprecations.html#support-for-tests-written-for-nose
fixture_result = next(generator)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 42 passed, 4 warnings in 0.12s ========================
thanks