SpeedCurve Library: Travis CI + coverage + tox

I’m writing a python library (speedcurve.py). At work, we’re using SpeedCurve to track our web performance. SpeedCurve’schangelog reveals can trigger a deployment (and a series of tests). I’m replacing our curl+ansible commands with this. I plan on integrating this with slack as well.

This project is heavily influenced by github3.py. I’ve been contributing frequently (plan on continuing to) and find it elegant. You’ll notice A LOT of similarities.

For this project, I want the following up front:
  • Proper Documentation
  • 100% test coverage and flake8 checks
  • Integration with Travis CI

This post focuses on configuring tox to execute coverage.

Configure tox + coverage

Since tox does NOT play nicely with pipes (|), this simple shell scripts checks for 100% test coverage:

This goes in tox.ini

Leave a Comment

Your email address will not be published. Required fields are marked *