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 (https://github.com/Morrolan/surrealism/tree/develop), 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 coveralls.io. 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,
Morrolan
Morrolan
 
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.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1262
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron