jsondiff
jsondiff copied to clipboard
1.3.1: test suite uses `nose-randomly`
nose-randomly
is archived an is no longer maintained https://github.com/adamchainz/nose-randomly/
Additionally pytest cannot find with default settings any units
+ /usr/bin/pytest -ra tests
=========================================================================== 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/jsondiff-1.3.1
plugins: anyio-3.3.4, black-0.3.12
collected 0 items
========================================================================== no tests ran in 0.02s ===========================================================================
Only when pytest is started with tests/*.py
it shows:
-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra tests/__init__.py tests/generate_readme.py tests/utils.py
=========================================================================== 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/jsondiff-1.3.1
plugins: anyio-3.3.4, black-0.3.12
collected 0 items / 2 errors
================================================================================== ERRORS ==================================================================================
________________________________________________________________ ERROR collecting tests/generate_readme.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jsondiff-1.3.1/tests/generate_readme.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)
tests/__init__.py:8: in <module>
from nose_random import randomize
E ModuleNotFoundError: No module named 'nose_random'
________________________________________________________________ ERROR collecting tests/generate_readme.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jsondiff-1.3.1/tests/generate_readme.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)
tests/__init__.py:8: in <module>
from nose_random import randomize
E ModuleNotFoundError: No module named 'nose_random'
========================================================================= short test summary info ==========================================================================
ERROR tests/generate_readme.py
ERROR tests/generate_readme.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 2 errors in 0.16s =============================================================================
Happy to accept a pull request to refactor tests to use pytest :)
Tested and lookd like it works
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jsondiff-2.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jsondiff-2.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.15, pytest-7.1.3, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jsondiff-2.0.0
plugins: hypothesis-6.41.0
collected 7 items
tests/test_jsondiff.py ....... [100%]
============================================================================ 7 passed in 12.41s ============================================================================
Thank you 👍