summaryrefslogtreecommitdiff
path: root/coverage/noseplugin.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-05-30 11:30:55 -0400
committerNed Batchelder <ned@nedbatchelder.com>2010-05-30 11:30:55 -0400
commit02adbba0489d0ff1f02677dd2cb8c4551020ddc1 (patch)
treec4f5b5443c43f536885a03140f4c49f6c1bb5fad /coverage/noseplugin.py
parent367dc70c9dcb1366503eb8441f1ded4d1093fb9c (diff)
downloadpython-coveragepy-02adbba0489d0ff1f02677dd2cb8c4551020ddc1.tar.gz
Move the test runner plugins into their own sub-package.
Diffstat (limited to 'coverage/noseplugin.py')
-rw-r--r--coverage/noseplugin.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/coverage/noseplugin.py b/coverage/noseplugin.py
deleted file mode 100644
index 9e254ea..0000000
--- a/coverage/noseplugin.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import logging
-from nose.plugins import Plugin
-
-from coverage.testplugin import CoverageTestWrapper, options as coverage_opts
-
-
-log = logging.getLogger(__name__)
-
-
-class Coverage(Plugin):
- """Nose plugin for coverage reporting."""
-
- score = 1
- status = {}
-
- def options(self, parser, env):
- """Add command-line options."""
-
- super(Coverage, self).options(parser, env)
- for opt in coverage_opts:
- parser.add_option(opt)
-
- def configure(self, options, config):
- """Configure plugin."""
-
- try:
- self.status.pop('active')
- except KeyError:
- pass
-
- super(Coverage, self).configure(options, config)
-
- self.config = config
- self.status['active'] = True
- self.options = options
-
- def begin(self):
- """Begin recording coverage information."""
-
- log.debug("Coverage begin")
- self.coverage = CoverageTestWrapper(self.options)
- self.coverage.start()
-
- def report(self, stream):
- """Output code coverage report."""
-
- log.debug("Coverage report")
- stream.write("Processing Coverage...")
- self.coverage.finish(stream)