From 1d04bef2ed404e2988c47ecc835662819219c3d8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 19 Nov 2009 20:20:57 -0500 Subject: The --omit option was checking name instead of filename. This is much better! Fixes #33. Thanks, Danek Duvall --- CHANGES.txt | 4 ++++ coverage/codeunit.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1ef464e..65fe8e8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,9 +13,13 @@ Version 3.2b2 - "except" clauses with types are no longer incorrectly marked as branches: `issue 35`_. +- The --omit option now works much better than before, fixing `issue 33`_. + Thanks, Danek Duvall. + .. _issue 30: http://bitbucket.org/ned/coveragepy/issue/30 .. _issue 31: http://bitbucket.org/ned/coveragepy/issue/31 .. _issue 32: http://bitbucket.org/ned/coveragepy/issue/32 +.. _issue 33: http://bitbucket.org/ned/coveragepy/issue/33 .. _issue 35: http://bitbucket.org/ned/coveragepy/issue/35 diff --git a/coverage/codeunit.py b/coverage/codeunit.py index 520774e..e310705 100644 --- a/coverage/codeunit.py +++ b/coverage/codeunit.py @@ -38,7 +38,7 @@ def code_unit_factory(morfs, file_locator, omit_prefixes=None): filtered = [] for cu in code_units: for prefix in prefixes: - if cu.name.startswith(prefix): + if cu.filename.startswith(prefix): break else: filtered.append(cu) -- cgit v1.2.1