Closed kloczek closed 1 year ago
Just in case fish and tcsh are installed in build env.
Hello, pytest is not supported by this project (tests are expected to be run using unittest).
Please be aware of fact that corectly written unittest test suite is corrctly handled by pytest.
As you saw in this case, that's incorrect. Pytest does not respect the expected failures markers that were in that test suite.
It's a moot point now, because the failing tests were part of a suite that supported a feature that we will no longer support going forward.
FYI: now in 3.0.3 pytest is failing completly different way
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-argcomplete-3.0.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-argcomplete-3.0.3-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.16, pytest-7.2.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/argcomplete-3.0.3
collected 60 items / 1 error
==================================== ERRORS ====================================
______________ ERROR collecting test/test_package/test_module.py _______________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/argcomplete-3.0.3/test/test_package/test_module.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)
test/test_package/test_module.py:3: in <module>
from test_package import main
E ModuleNotFoundError: No module named 'test_package'
=========================== short test summary info ============================
ERROR test/test_package/test_module.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.13s ===============================
3.0.5 is failing in new way Here is pytest output:
Again, in the interest of clarity - this project does not support the use of pytest to run unittest style tests. Package manager maintainers who wish to run the test suite are expected to follow the package provided method of running tests. While pytest does a good job of emulating the basic unittest protocol, it does not implement the full fidelity of the unittest API and can't be expected to run tests reliably in suites that are not written to support pytest.
Issue is that amongst +1.1k alredy packaged as rpm packages python modules probably +1/4 have been declared to support only unittest and despite that only on testing argcomplete
unittest test suite it fails usimg pytest.
Perhaps you should stop trying to test it with pytest then?
Looks like still it is some issue