diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2011-05-31 23:12:40 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-05-31 23:12:40 -0400 |
| commit | 90df419fb875c0bd8e1f5534a16441e0caeef1b8 (patch) | |
| tree | 68ad41c6b664a7d4f76d1e2de691e5f27836b63a /test/coveragetest.py | |
| parent | 5055b918685108814f1850a227402576ad66074b (diff) | |
| download | python-coveragepy-90df419fb875c0bd8e1f5534a16441e0caeef1b8.tar.gz | |
Better handling of the partial-branch exclusion regexes. Finishes issue #113.
Diffstat (limited to 'test/coveragetest.py')
| -rw-r--r-- | test/coveragetest.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/coveragetest.py b/test/coveragetest.py index 93cffa8..c227659 100644 --- a/test/coveragetest.py +++ b/test/coveragetest.py @@ -251,8 +251,9 @@ class CoverageTest(TestCase): s2 = "\n".join([repr(a) for a in a2]) + "\n" self.assertMultiLineEqual(s1, s2, msg) - def check_coverage(self, text, lines=None, missing="", excludes=None, - report="", arcz=None, arcz_missing="", arcz_unpredicted=""): + def check_coverage(self, text, lines=None, missing="", report="", + excludes=None, partials="", + arcz=None, arcz_missing="", arcz_unpredicted=""): """Check the coverage measurement of `text`. The source `text` is run and measured. `lines` are the line numbers @@ -285,6 +286,8 @@ class CoverageTest(TestCase): cov.erase() for exc in excludes or []: cov.exclude(exc) + for par in partials or []: + cov.exclude(par, which='partial') cov.start() try: # pragma: recursive coverage |
