diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 15:50:00 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-21 15:50:00 -0500 |
commit | 72e1b987eae3db3793d057a360dae6e40f1cbcc1 (patch) | |
tree | 42d4f1ef5a1207e52a6e02f4f040781c9a42b461 /test/test_parser.py | |
parent | 2adca2bfe644f9214f520410738055c6905a3e66 (diff) | |
download | python-coveragepy-git-72e1b987eae3db3793d057a360dae6e40f1cbcc1.tar.gz |
Add a failing test that rozza's change will fix
Diffstat (limited to 'test/test_parser.py')
-rw-r--r-- | test/test_parser.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_parser.py b/test/test_parser.py index dc712b6c..201d5329 100644 --- a/test/test_parser.py +++ b/test/test_parser.py @@ -53,6 +53,20 @@ class ParserTest(CoverageTest): 1: 1, 2:1, 3:1, 4:1, 5:1, 6:1, 7:1, 8:1, 9:1 }) + def test_excluded_classes(self): + cp = self.parse_source("""\ + class Foo: + def __init__(self): + pass + + if 0: # nocover + class Bar: + pass + """) + self.assertEqual(cp.exit_counts(), { + 1:1, 2:1, 3:1 + }) + def XXX_missing_branch_to_excluded_code(self): cp = self.parse_source("""\ if fooey: |