Skip to main content

flake8 based linter for vedro framework

Project description

flake8-vedro

Flake8 based linter for Vedro framework

Installation

pip install flake8-vedro

Configuration

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

You can ignore rules via

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

Some rules in linter should be configurated:

[flake8]
scenario_params_max_count = 8  # VDR109
allowed_to_redefine_list = page,page2  # VDR311
is_context_assert_optional = true     # VDR400
allowed_interfaces_list = KafkaApi,SmthApi  # VDR302
allow_partial_redefinitions_in_one_step = True # VDR312
allow_unused_with_block_attributes = False  # VDR313
ignore_variables_pattern = ^(log|history).*  # VDR313

Rules

Scenario Rules

  1. VDR001. Decorator @vedro.only should not be presented
  2. VDR002. Scenario should be inherited from class vedro.Scenario
  3. VDR103. Scenario should be located in the folder "scenarios/”
  4. VDR104. Scenario should have a subject
  5. VDR105. Scenario subject should not be empty
  6. VDR106. Scenario should have only one subject
  7. VDR107. Subject is not parameterized*
  8. VDR108. Calling functions in parametrization
  9. VDR109. Limit the amount of parameters in a parametrized scenario

Scenario Steps Rules

  1. VDR300. Step name should start with..
  2. VDR301. Steps name should be in right order
  3. VDR302. Interface should not be used in given or asserted steps
  4. VDR303. Scenario should have a "when" step
  5. VDR304. Scenario should have only one "when" step
  6. VDR305. Scenario should have a "then" step
  7. VDR306. Scenario should have only one "then" step
  8. VDR307. Step should have an assertion
  9. VDR308. Step should have specific assertions
  10. VDR309. Step should not have comparison without assert
  11. VDR310. Some steps should not have an assertion
  12. VDR311. Scope variables should not be redefined
  13. VDR312. Scope variables should not be partially redefined
  14. VDR313. Scope variables should not be left unused

Contexts Rules

  1. VDR400. Contexts should have specific assertions

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-1.1.2.tar.gz (23.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-1.1.2-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file flake8_vedro-1.1.2.tar.gz.

File metadata

  • Download URL: flake8_vedro-1.1.2.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for flake8_vedro-1.1.2.tar.gz
Algorithm Hash digest
SHA256 a397e088dea163a8b2d88da99a40769948da4fe82bd2622bf9b75d8ad9ca4fdb
MD5 d5ee0759ce7617aeedfa7efa40ebb177
BLAKE2b-256 de012a1c93ccb435f3f0ac7df7d6ef05a6f2170630ebc0cbe5204b2c98eba5bd

See more details on using hashes here.

File details

Details for the file flake8_vedro-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: flake8_vedro-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for flake8_vedro-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a984f3f853d7b9a4123be8677f1bb9aa28dbae656669be2b70afcd44a842b24a
MD5 d25cf9840c927a1478eb77efb11effb3
BLAKE2b-256 b44819edf8ce78688a5d2316d9711ef8bf060a4292a2d9f73e425f66332a7a23

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