[TIP] Feedback request: flake8-aaa

James Cooke me at jamescooke.info
Wed Sep 12 14:32:11 PDT 2018


Hi all,

If you're using something like the Arrange Act Assert pattern (AAA) /
Given When Then for writing your Python tests and Flake8 for linting
your code, then I'd be interested in your feedback on a Flake8 plugin
that I've been working on called flake8-aaa:
https://github.com/jamescooke/flake8-aaa
This plugin is in beta and currently checks four basic rules to help
break a test into three distinct blocks:
https://flake8-aaa.readthedocs.io/en/stable/rules.html and is based on
the description that I've put together for AAA here:
https://jamescooke.info/arrange-act-assert-pattern-for-python-developers.html
.
Some background: I wrote the plugin because I found that I was
slipping when following the AAA pattern and Adam (who some of you
might know https://github.com/adamchainz/) suggested that I write a
Flake8 plugin. It's currently kind of self-hosted (in that it tests
its own tests at test time), plus I'm using it happily at work and in
some open source projects.
Please let me know via email or GitHub issues if:
- You like the idea and want more!
- You have any tests that failed any of the current four checks, but
  think they shouldn't have.- Conversely, you've found a test that passed, but you think it
  shouldn't have.- This kind of thing is interesting, but you'd prefer a plugin
  for pylint.- You've spotted that my plugin's code is terrible and how I should
  improve it (PRs welcome ;) )- There's already something that does this / some other package that I
  should be putting my efforts into.
Thanks for reading and happy testing!

James


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20180912/e1685e4a/attachment.htm>


More information about the testing-in-python mailing list