avoid prepend to register api as it's redundant wrt to hooks
--HG-- branch : plugin_no_pytest
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user