[openstack-dev] [Keystone] unit test coverage

Kevin L. Mitchell kevin.mitchell at rackspace.com
Wed Dec 5 19:48:27 UTC 2012

On Wed, 2012-12-05 at 14:01 -0500, Adam Young wrote:
> On 12/05/2012 12:26 PM, Kevin L. Mitchell wrote:
> > On Tue, 2012-12-04 at 22:10 -0500, Adam Young wrote:
> >> keystone.identity.core           62%     No Big deal:  all the un
> >> implemented functions.
> > As a point of information, you can add "# Pragma: nocover" to lines to
> > make them be skipped.
> Can you do that for an entire file?  We have certain files that are just 
> interface specifications, and we really don't expect the exceptions for 
> unimplemented to ever be thrown, at least not in a unit test.

Supposedly you can use a configuration file to fine-tune file selection
for coverage purposes, but I haven't had any success with that (in
conjunction with tox, at least).  I haven't tried it with adding the
configuration file to the MANIFEST.in, though, so that could potentially
have an effect.  (To see what I'm talking about, see .coveragerc in the
top-level of nova.)
Kevin L. Mitchell <kevin.mitchell at rackspace.com>

More information about the OpenStack-dev mailing list