dotenv-linter icon indicating copy to clipboard operation
dotenv-linter copied to clipboard

Test each unique violation

Open sobolevn opened this issue 6 years ago • 0 comments

We need to create integration tests for all violations.

How should it look like?

  1. We create a folder tests/fixtures/integration
  2. We create a folder called tests/test_violations/ where all other tests will be located
  3. Inside tests/test_violations/ we create a single test_VIOLATION_TYPE/ subfolder for all violation types
  4. Then we create individual tests file for each violation class in the corresponding types subfolders

How should it work?

  1. We create a fixture file with .env contents
  2. We start a new process with Popen to lint this fixture with dotenv-linter command
  3. We check the outputs

Example: https://github.com/wemake-services/wemake-python-styleguide/blob/master/tests/test_plugins.py

sobolevn avatar Dec 11 '18 15:12 sobolevn