diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-19 20:20:57 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-19 20:20:57 -0500 |
commit | 1d04bef2ed404e2988c47ecc835662819219c3d8 (patch) | |
tree | 479489d1b79f9bcf2c42a1cda1d1d0c5bf15a724 | |
parent | d449757838d272f6cbf23e07fddf18b5824adb26 (diff) | |
download | python-coveragepy-1d04bef2ed404e2988c47ecc835662819219c3d8.tar.gz |
The --omit option was checking name instead of filename. This is much better! Fixes #33. Thanks, Danek Duvall
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | coverage/codeunit.py | 2 |
2 files changed, 5 insertions, 1 deletions
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) |