Remove __multicall__ from pytest_sessionfinish

This commit is contained in:
Bruno Oliveira
2017-08-09 07:31:09 -03:00
parent 0738c3e1e2
commit 02754d84d3

View File

@@ -8,7 +8,7 @@
import sys import sys
import os import os
import pytest
class SlaveInteractor: class SlaveInteractor:
def __init__(self, config, channel): def __init__(self, config, channel):
@@ -33,11 +33,11 @@ class SlaveInteractor:
slaveinfo = getinfodict() slaveinfo = getinfodict()
self.sendevent("slaveready", slaveinfo=slaveinfo) self.sendevent("slaveready", slaveinfo=slaveinfo)
def pytest_sessionfinish(self, __multicall__, exitstatus): @pytest.hookimpl(hookwrapper=True)
def pytest_sessionfinish(self, exitstatus):
self.config.slaveoutput['exitstatus'] = exitstatus self.config.slaveoutput['exitstatus'] = exitstatus
res = __multicall__.execute() yield
self.sendevent("slavefinished", slaveoutput=self.config.slaveoutput) self.sendevent("slavefinished", slaveoutput=self.config.slaveoutput)
return res
def pytest_collection(self, session): def pytest_collection(self, session):
self.sendevent("collectionstart") self.sendevent("collectionstart")