Python code coverage of 100% - luck or bad config?

This is the place for queries that don't fit in any of the other categories.

Python code coverage of 100% - luck or bad config?

Postby Morrolan » Tue Apr 22, 2014 2:09 pm

Hi all,

First of all let me say that I am not a developer, I am an amateur python hacker at best. I have written a couple of python modules and published them to pypi, but only recently have I got into proper test-driven development and unittesting my code rather than just adding print statements etc.

For my latest module surrealism (, I have written a suite of tests which I believed to be fairly comprehensive.

Over the past day or so I have discovered Travis-CI and Travis is working correctly, it is building and testing my code and my code is passing, but once I configured coveralls (in both the .travis.yml and .coveragerc files), my code coverage result is showing as 100% and I don't know whether I've just lucked out with my relatively small amount of code and have genuinely hit 100% coverage, or whether I'm simply misconfigure something!

I was wondering if someone with coveralls experience could please take a look at my config and check to see if it is OK?

Note only the develop branch has the config at this moment in time.

Many thanks in advance,
Posts: 2
Joined: Mon May 13, 2013 4:27 pm

Re: Python code coverage of 100% - luck or bad config?

Postby micseydel » Tue Apr 22, 2014 11:36 pm

I don't have the experience you mentioned, but looking at your code, there isn't too much logic so it doesn't seem extraordinary to get 100% code coverage (even branch coverage here). If you're really concerned that it's not correct, it should be easy to create some code you know won't be exercised by the tests. If it still reads 100%, you know there's something wrong.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Return to General Coding Help

Who is online

Users browsing this forum: Majestic-12 [Bot] and 6 guests