summaryrefslogtreecommitdiff
path: root/tests/plugin1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugin1.py')
-rw-r--r--tests/plugin1.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/plugin1.py b/tests/plugin1.py
index 0ba09d93..af4dfc52 100644
--- a/tests/plugin1.py
+++ b/tests/plugin1.py
@@ -1,3 +1,6 @@
+# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
+
"""A plugin for test_plugins.py to import."""
import os.path
@@ -17,7 +20,7 @@ class Plugin(coverage.CoveragePlugin):
return FileReporter(filename)
-class FileTracer(coverage.plugin.FileTracer):
+class FileTracer(coverage.FileTracer):
"""A FileTracer emulating a simple static plugin."""
def __init__(self, filename):
@@ -37,14 +40,11 @@ class FileTracer(coverage.plugin.FileTracer):
return lineno*100+5, lineno*100+7
-class FileReporter(coverage.plugin.FileReporter):
+class FileReporter(coverage.FileReporter):
"""Dead-simple FileReporter."""
- def statements(self):
+ def lines(self):
return set([105, 106, 107, 205, 206, 207])
- def excluded_statements(self):
- return set([])
-
def coverage_init(reg, options): # pylint: disable=unused-argument
"""Called by coverage to initialize the plugins here."""