Skip to content

Commit

Permalink
CI: use pytest-flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jul 17, 2020
1 parent 33955cc commit 9211591
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
select = F
ignore = E,W,C,F401,F841,F541
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ script:
- helm version --client
- chartpress --version
- chartpress --help
- pytest --verbose --flakes
- pytest --verbose --flake8

jobs:
include:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,5 @@ pip install -e .
pip install -r dev-requirements.txt
# run tests
pytest --verbose --flakes --exitfirst
pytest --verbose --flake8 --exitfirst
```
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bump2version
gitpython
pytest
pytest-flakes
pytest-flake8
9 changes: 4 additions & 5 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

These tests are [pytest](https://docs.pytest.org) tests.


```bash
pytest -vx --flakes
pytest -vx --flake8

# -v / --verbose:
# allows you to see the names etc of individual tests etc.
# -x / --exitfirst:
# to stop running tests of first error
# --flakes:
# use pyflakes to add some static code analysis tests
# --flake8:
# use pytest-flake8 to add some static code analysis tests
# -k:
# only run tests which match the given substring
```
Expand All @@ -23,7 +22,7 @@ pytest -vx --flakes
- [pytest](https://docs.pytest.org)
- Fixture: [capfd](https://docs.pytest.org/en/latest/reference.html#_pytest.capture.capfd)
- Fixture: [monkeypatching](https://docs.pytest.org/en/latest/capfd.html)
- [pytest-flakes](https://github.com/fschulze/pytest-flakes) and
- [pytest-flake8](https://github.com/fschulze/pytest-flakes) and
[pyflakes](https://github.com/PyCQA/pyflakes) for passive code check tests
added to the other pytest tests when using the `--flakes` flag with `pytest`.
- [GitPython](https://gitpython.readthedocs.io/en/stable/)

0 comments on commit 9211591

Please sign in to comment.