reverbc / pylint-pytest

A Pylint plugin to suppress pytest-related false positives.
https://pypi.org/project/pylint-pytest/
MIT License
3 stars 8 forks source link

🐛 Ignore collection failures in non-tests #22

Open webknjaz opened 3 years ago

webknjaz commented 3 years ago

This change applies the pre-existing patterns to identify if the files with collection problems are tests. It is then used to eliminate the false-positives of F6401 (cannot-enumerate-pytest-fixtures).

As a side effect, this patch also includes precise file paths that may be used to reproduce the problem.

Fixes #20 Fixes #21

webknjaz commented 3 years ago

Hey @nedbat, could you check this PR in the context of your report #20?

whg517 commented 3 years ago

I hope this feature will be incorporated soon because my F6401 is really annoying me. Sometimes it just show cannot-enumerate-pytest-fixtures and I don't know what went wrong,

nedbat commented 3 years ago

@webknjaz thanks, this does fix my issue.

huxuan commented 2 years ago

Any further progress on this? Really appreciate if this mr can be merged with a new version released.

nedbat commented 2 years ago

I've confirmed that this pull request prevents the errors I reported.

marcgibbons commented 2 years ago

@reverbc Can this get merged & published?