Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to parse when no exceptions/assertions are reported #71

Open
alfredodeza opened this issue Feb 19, 2020 · 0 comments
Open

fails to parse when no exceptions/assertions are reported #71

alfredodeza opened this issue Feb 19, 2020 · 0 comments
Assignees
Labels
parsing Errors with parsin

Comments

@alfredodeza
Copy link
Owner

In this case a fixture was called directly in a test method and Pytest complained. What happened here is that the fixture name got changed and the test method didn't get updated.

The fix, which would help with many other problems here is that the priority in parsing needs to be the last line where Pytest reports how many passing/failing/skipped/errors

pytest -k paginates_with_cursor_x  -v ../../../../../test/unit/anchore_enterprise/services/feeds/drivers/github/test_parsers.py
============================= test session starts ==============================
platform darwin -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /Users/alfredo/.virtualenvs/enterprise/bin/python3
cachedir: .pytest_cache
rootdir: /Users/alfredo/python/enterprise, inifile: pytest.ini
plugins: cov-2.8.1
collected 30 items / 29 deselected / 1 selected

../../../../../test/unit/anchore_enterprise/services/feeds/drivers/github/test_parsers.py::TestGetNestedVulnerabilities::test_paginates_with_cursor_x FAILED [100%]

=================================== FAILURES ===================================
__________ TestGetNestedVulnerabilities.test_paginates_with_cursor_x ___________
Fixture "advisory" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
=============================== warnings summary ===============================
/Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/jsonschema-2.6.0-py3.8.egg/jsonschema/compat.py:6
/Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/jsonschema-2.6.0-py3.8.egg/jsonschema/compat.py:6
  /Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/jsonschema-2.6.0-py3.8.egg/jsonschema/compat.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import MutableMapping, Sequence  # noqa

/Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/yosai-0.3.2-py3.8.egg/yosai/core/utils/utils.py:56
  /Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/yosai-0.3.2-py3.8.egg/yosai/core/utils/utils.py:56: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    class OrderedSet(collections.MutableSet):

/Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/cbor2-5.0.0-py3.8-macosx-10.9-x86_64.egg/cbor2/decoder.py:3
  /Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/cbor2-5.0.0-py3.8-macosx-10.9-x86_64.egg/cbor2/decoder.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import Mapping

/Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/graphene-2.1.8-py3.8.egg/graphene/relay/connection.py:2
  /Users/alfredo/.virtualenvs/enterprise/lib/python3.8/site-packages/graphene-2.1.8-py3.8.egg/graphene/relay/connection.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import Iterable, OrderedDict

-- Docs: https://docs.pytest.org/en/latest/warnings.html
================= 1 failed, 29 deselected, 5 warnings in 1.99s =================
@alfredodeza alfredodeza self-assigned this Jul 31, 2024
@alfredodeza alfredodeza added the parsing Errors with parsin label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parsing Errors with parsin
Projects
None yet
Development

No branches or pull requests

1 participant