diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-02 13:41:13 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-01-02 13:41:13 -0500 |
| commit | 02cecb43c2cf5693eace5c60204e0831a0ec49b7 (patch) | |
| tree | 58e2a424f001ac0c6b2e68959bb0bf84f675fa91 /tests/plugin1.py | |
| parent | 7170c660826939a0f31137300bc29c5843095e47 (diff) | |
| download | python-coveragepy-02cecb43c2cf5693eace5c60204e0831a0ec49b7.tar.gz | |
Start formalizing the FileReporter interface to simplify things
Diffstat (limited to 'tests/plugin1.py')
| -rw-r--r-- | tests/plugin1.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/plugin1.py b/tests/plugin1.py index c766002..f9da35c 100644 --- a/tests/plugin1.py +++ b/tests/plugin1.py @@ -3,7 +3,6 @@ import os.path import coverage -from coverage.parser import CodeParser class Plugin(coverage.CoveragePlugin): @@ -40,10 +39,8 @@ class FileTracer(coverage.plugin.FileTracer): class FileReporter(coverage.plugin.FileReporter): """Dead-simple FileReporter.""" - def get_parser(self, exclude=None): - return PluginParser() + def statements(self): + return set([105, 106, 107, 205, 206, 207]) -class PluginParser(CodeParser): - """CodeParser hard-coded for a test in test_plugins.py.""" - def parse_source(self): - return set([105, 106, 107, 205, 206, 207]), set([]) + def excluded_statements(self): + return set([]) |
