summaryrefslogtreecommitdiff
path: root/test/test_parser.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-11-21 15:50:00 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-11-21 15:50:00 -0500
commitf55056e750c1ca325b917c311f3678e9e5d28389 (patch)
tree2669174594b74752cff4212ebe05648af9ceb6e1 /test/test_parser.py
parent05565941a0a7d6d641d80277c091ef083ec17629 (diff)
downloadpython-coveragepy-f55056e750c1ca325b917c311f3678e9e5d28389.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.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_parser.py b/test/test_parser.py
index dc712b6..201d532 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: