You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that you are using as test suite unittest istead pytest however corroctly written unittest based test suite should be working with pytest as well.
On use pytest there are two issues:
pytest is not able find units because it scans by default tests_*py files only
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pylev-1.4.0-18.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pylev-1.4.0-18.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra -m 'not network'==================================================================================== test session starts ====================================================================================platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0rootdir: /home/tkloczko/rpmbuild/BUILD/pylev-1.4.0collected 0 items=================================================================================== no tests ran in 0.01s ===================================================================================
on pass as param tests.py pytest fails in one unit
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pylev-1.4.0-18.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pylev-1.4.0-18.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra -m 'not network' tests.py==================================================================================== test session starts ====================================================================================platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.2.0rootdir: /home/tkloczko/rpmbuild/BUILD/pylev-1.4.0collected 23 itemstests.py ......................E [100%]========================================================================================== ERRORS ===========================================================================================_________________________________________________________________________________ ERROR at setup of test_fn _________________________________________________________________________________file /home/tkloczko/rpmbuild/BUILD/pylev-1.4.0/tests.py, line 32 def _test_fn(self):E fixture 'self' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]'forhelp on them./home/tkloczko/rpmbuild/BUILD/pylev-1.4.0/tests.py:32================================================================================== short test summary info ==================================================================================ERROR tests.py::test_fn================================================================================ 22 passed, 1 error in 0.05s ================================================================================
The text was updated successfully, but these errors were encountered:
I know that you are using as test suite unittest istead pytest however corroctly written unittest based test suite should be working with pytest as well.
On use pytest there are two issues:
The text was updated successfully, but these errors were encountered: