Skip to content

Warning while running tests #64

Open
@filbranden

Description

I see this warning when running tests/test_skip_if_exists.py:

$ pytest tests/test_skip_if_exists.py
============================================================================== test session starts ==============================================================================
platform linux -- Python 3.8.6, pytest-4.6.11, py-1.10.0, pluggy-0.13.1
rootdir: ~/devel/jupyter-packaging
plugins: anyio-2.0.2
collected 2 items                                                                                                                                                               

tests/test_skip_if_exists.py ..                                                                                                                                           [100%]

=============================================================================== warnings summary ================================================================================
tests/test_skip_if_exists.py:7
  ~/devel/jupyter-packaging/tests/test_skip_if_exists.py:7: PytestCollectionWarning: cannot collect test class 'TestCommand' because it has a __init__ constructor (from: tests/test_skip_if_exists.py)
    class TestCommand(BaseCommand):

-- Docs: https://docs.pytest.org/en/latest/warnings.html
===================================================================== 2 passed, 1 warnings in 0.09 seconds ======================================================================

Can this be fixed not to produce a warning and finish with a fully clean run?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions