Skip to content

FiruzShoev/flake8-vedro

 
 

Repository files navigation

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

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

About

Flake8 based linter for Vedro framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Makefile 0.4%