Skip to main content

A Pylint plugin to suppress pytest-related false positives.

Project description

pylint-pytest

PyPI version fury.io Travis CI

A Pylint plugin to suppress pytest-related false positives.

Installation

Requirements:

  • pylint
  • pytest>=4.6

To install:

$ pip install pylint-pytest

Usage

Enable via command line option --load-plugins

$ pylint --load-plugins pylint_pytest <path_to_your_sources>

Or in pylintrc:

[MASTER]
load-plugins=pylint_pytest

Suppressed Pylint Warnings

unused-argument

FP when a fixture is used in an applicable function but not referenced in the function body, e.g.

def test_something(conftest_fixture):  # <- Unused argument 'conftest_fixture'
    assert True

unused-import

FP when an imported fixture is used in an applicable function, e.g.

from fixture_collections import imported_fixture  # <- Unused imported_fixture imported from fixture_collections

def test_something(imported_fixture):
    ...

redefined-outer-name

FP when an imported/declared fixture is used in an applicable function, e.g.

from fixture_collections import imported_fixture

def test_something(imported_fixture):  # <- Redefining name 'imported_fixture' from outer scope (line 1)
    ...

Changelog

See CHANGELOG.

License

pylint-pytest is available under MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylint_pytest-0.1.2-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pylint_pytest-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: pylint_pytest-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for pylint_pytest-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a076d91b1395635fc4290e1361c851d2cdaa989c396f54a17f716af04abef3d0
MD5 02b7caebe3a7a466ca0b25d3db4d80b9
BLAKE2b-256 05f8310404ea29b7305d8aab10cdabf85f728066d919c5f999f4962a623960df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page