Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Handle pytest failure #16

Open
Open
@kasium

Description

@kasium

Feature request type

  • Suppress false positives from existing pylint warnings
  • Add new pytest-specific warning
  • Other

Is your feature request related to a problem? Please describe.
This plugin executes pytest in the background which obviously loads modules. If loading of a module fails for whatever reasons (e.g. init imports an non-existing type), pytest will fail. However, pylint-pytest just ignores the failure and continue as nothing happens. Since no fixtures could be collected, all previously suppressed errors will be shown.
Of course, the issue can be found with pylint, etc. But e.g. in my project I suppress >50 errors which makes it hard to find the root cause.

Describe the solution you'd like
I would be nice, if pylint-pytest could fail on an pytest error or at least shown an indicator. Maybe a configuration can help :-)

Sample code to demonstrate the current imperfect behavior

import pytest
import this_is_invalid  # makes pytest fail

@pytest.fixture
def fix():
  pass

def test_a(fix):
  pass

With the above code, no supression will happen, but you will not see, that this was caused by an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions