jmespath / jmespath.py

JMESPath is a query language for JSON.
http://jmespath.org
MIT License
2.19k stars 181 forks source link

Switch from nose to pytest #271

Closed jamesls closed 2 years ago

kloczek commented 2 years ago

Just tested 1.0.00 and looks like remove using nose is not fully finished ..

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jmespath-1.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jmespath-1.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-7.1.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jmespath.py-1.0.0
collected 969 items / 1 error

================================================================================== ERRORS ==================================================================================
________________________________________________________________ ERROR collecting extra/test_hypothesis.py _________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/jmespath.py-1.0.0/extra/test_hypothesis.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)
extra/test_hypothesis.py:9: in <module>
    from nose.plugins.skip import SkipTest
E   ModuleNotFoundError: No module named 'nose'
========================================================================= short test summary info ==========================================================================
ERROR extra/test_hypothesis.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.27s =============================================================================
nateprewitt commented 2 years ago

Hi @kloczek, this was already addressed in #276.

kloczek commented 2 years ago

Testesd and it works. Nevertheless pytest still shows one warning

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jmespath-1.0.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jmespath-1.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-7.1.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jmespath.py-1.0.0
plugins: hypothesis-6.39.3
collected 976 items

extra/test_hypothesis.py .......                                                                                                                                     [  0%]
tests/test_compliance.py ........................................................................................................................................... [ 14%]
.................................................................................................................................................................... [ 31%]
.................................................................................................................................................................... [ 48%]
.................................................................................................................................................................... [ 65%]
.................................................................................................................................................................... [ 82%]
......................................................................................................                                                               [ 92%]
tests/test_custom_functions.py .                                                                                                                                     [ 92%]
tests/test_functions.py .....                                                                                                                                        [ 93%]
tests/test_lexer.py ...................                                                                                                                              [ 95%]
tests/test_parser.py ..........................................                                                                                                      [ 99%]
tests/test_search.py ....s                                                                                                                                           [100%]

============================================================================= warnings summary =============================================================================
extra/test_hypothesis.py: 3 warnings
tests/test_compliance.py: 11 warnings
tests/test_lexer.py: 3 warnings
  /home/tkloczko/rpmbuild/BUILDROOT/python-jmespath-1.0.0-2.fc35.x86_64/usr/lib/python3.8/site-packages/jmespath/lexer.py:169: PendingDeprecationWarning: deprecated string literal syntax
    warnings.warn("deprecated string literal syntax",

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] tests/test_search.py:55: Test requires long() type
========================================================= 975 passed, 1 skipped, 17 warnings in 518.16s (0:08:38) ==========================================================