diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2010-07-12 07:30:25 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2010-07-12 07:30:25 -0400 |
commit | 59598ee67a7bea4789e2a851b1bae8e481c82462 (patch) | |
tree | d4c44cd0f649d24b6887d27133417f152a06ed51 /coverage/runners/pytestplugin.py | |
parent | b153c116dae0c16de7a4c757af6c4f0baf93e13d (diff) | |
download | python-coveragepy-git-59598ee67a7bea4789e2a851b1bae8e481c82462.tar.gz |
Remove the test runner plugins for now.
Diffstat (limited to 'coverage/runners/pytestplugin.py')
-rw-r--r-- | coverage/runners/pytestplugin.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/coverage/runners/pytestplugin.py b/coverage/runners/pytestplugin.py deleted file mode 100644 index 0032b13b..00000000 --- a/coverage/runners/pytestplugin.py +++ /dev/null @@ -1,34 +0,0 @@ -"""py.test plugin hooks""" - -from coverage.runners.plugin import CoverageTestWrapper, OPTIONS - -def pytest_addoption(parser): - """Get all the options from the coverage.runner and import them.""" - group = parser.getgroup('Coverage options') - for opt in OPTIONS: - group._addoption_instance(opt) - -def pytest_configure(config): - """Load the runner and start it up.""" - if config.getvalue("cover_actions"): - config.pluginmanager.register(CoveragePlugin(config), "do_coverage") - -class CoveragePlugin: - """The py.test coverage plugin.""" - - def __init__(self, config): - self.config = config - - def pytest_sessionstart(self): - """Called before session.main() is called.""" - self.coverage = CoverageTestWrapper(self.config.option) - # XXX maybe better to start/suspend/resume coverage - # for each single test item - self.coverage.start() - - def pytest_terminal_summary(self, terminalreporter): - """Add an additional section in the terminal summary reporting.""" - tw = terminalreporter._tw - tw.sep('-', 'coverage') - tw.line('Processing Coverage...') - self.coverage.finish() |