Handle pytest failure #16
Description
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.