Making Coveralls work with PyPy and skip Python 2.5 on Travis-CI

I have a couple of projects that get tested on Travis-CI and I just discovered Coveralls, a tool which integrates with it to provide a code coverage badge to go alongside your build status badge. (and is also free for open-source projects)

Unit Test Status Coverage Status

Unfortunately, it seems that there’s a bug in the current Python client that causes it to error out when submitting coverage data from PyPy builds. (It tries to grab source for compiled PyPy modules with no source available and then dies when it can’t).

Here’s the boilerplate I use to skip it on Python 2.5 (which it doesn’t support), make it complete successfully on PyPy, and omit things like the unit test framework itself from the report:

CC BY-SA 4.0 Making Coveralls work with PyPy and skip Python 2.5 on Travis-CI by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

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

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.

All comments are moderated. If your comment is generic enough to apply to any post, it will be assumed to be spam. Borderline comments will have their URL field erased before being approved.