Skip to main content

flake8 based linter for vedro framework and mocks

Project description

flake8-vedro-mocks

Flake8 based linter for Vedro framework and mocks

Installation

pip install flake8-vedro-mocks

Configuration

flake8-vedro-mocks is a flake8 plugin, so the configuration is the same as flake8 configuration.

You can ignore rules via

  • file setup.cfg: parameter ignore
    [flake8]
    ignore = MCS001
    
  • comment in code #noqa: MCS001

You can configure some rules

  • To target mocks with a specific name pattern in rules MCS001 and MCS002:
    [flake8]
    mock_name_pattern = (?=.*mock)(?!.*grpc)  # MCS001, # MCS002 
    

Rules

Scenario Steps Rules

  1. MCS001. Mock call result should be saved as "self" attribute for further assertion
  2. MCS002. Mock call result should be asserted in "then" or "and" or "but" step

Project details


Download files

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

Source Distribution

flake8_vedro_mocks-1.0.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

flake8_vedro_mocks-1.0.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file flake8_vedro_mocks-1.0.0.tar.gz.

File metadata

  • Download URL: flake8_vedro_mocks-1.0.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for flake8_vedro_mocks-1.0.0.tar.gz
Algorithm Hash digest
SHA256 667d069e7bf6994844cf027e0e03ec52a4a2fe998c8c78d92b06d794d3d9c5fb
MD5 aca1825aa075cbc1ae31fe815789137d
BLAKE2b-256 0c94c942932b97d785e6b0cd4399c4eb39e6b7d0df6188b3d92d23a21b62b306

See more details on using hashes here.

File details

Details for the file flake8_vedro_mocks-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_vedro_mocks-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8987a27b38e385da961fe5b1c8417d0cf77609de6aa5eba4992b2c237decde6a
MD5 86b936e999142f78b8b76ff4807872d2
BLAKE2b-256 f41deec63a90439213af91f4ea93fd14ddfcfa8fbbc3bb00ace54611b21410ac

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