A linter for Python tests
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
docs
examples/good
flake8_aaa
requirements
tests
.gitignore
.pylintrc
.travis.yml
CHANGELOG.rst
CODE_OF_CONDUCT.md
LICENSE
MANIFEST.in
Makefile
README.rst
on_master.sh
run_pylint.sh
setup.cfg
setup.py
tox.ini

README.rst

Travis build Read the Docs PyPI PyPI - Python Version flake8-aaa is licensed under the MIT License

Flake8-AAA

A linter for Python tests.

  • Pytest and unittest styles supported.
  • Tests are linted against the Arrange Act Assert pattern.
  • Provides a Flake8 interface to automatically lint test files as part of your Flake8 run.
  • Provides a command line interface for custom (non-Flake8) usage and debugging.

Installation

Install with pip:

$ pip install flake8-aaa

Integration with Flake8

Given that you already have Flake8 installed in the same environment, check that Flake8-AAA was installed correctly by asking flake8 for its version signature:

$ flake8 --version
3.6.0 (aaa: 0.4.0, mccabe: 0.6.1, pycodestyle: 2.4.0, pyflakes: 2.0.0) CPython 3.6.7 on Linux

The (aaa: 0.4.0, ... part of that output tells you flake8 found this plugin. Now you can run flake8 as usual against your project and Flake8-AAA will lint your tests via its plugin:

$ flake8

Resources

Tested on Pythons 3.5 and 3.6.

Python 2 supported up to v0.4.0: pypi, docs, tag.