avoid prepend to register api as it's redundant wrt to hooks

--HG--
branch : plugin_no_pytest
This commit is contained in:
holger krekel
2015-04-22 13:31:46 +02:00
parent 1ef49ac5ab
commit 7049ebe4e2
3 changed files with 5 additions and 18 deletions

View File

@@ -510,7 +510,7 @@ class Session(FSCollector):
def __init__(self, config):
FSCollector.__init__(self, config.rootdir, parent=None,
config=config, session=self)
self.config.pluginmanager.register(self, name="session", prepend=True)
self.config.pluginmanager.register(self, name="session")
self._testsfailed = 0
self.shouldstop = False
self.trace = config.trace.root.get("collection")
@@ -521,10 +521,12 @@ class Session(FSCollector):
def _makeid(self):
return ""
@pytest.mark.tryfirst
def pytest_collectstart(self):
if self.shouldstop:
raise self.Interrupted(self.shouldstop)
@pytest.mark.tryfirst
def pytest_runtest_logreport(self, report):
if report.failed and not hasattr(report, 'wasxfail'):
self._testsfailed += 1