Fixed activation and used just runtest_protocol hook
This commit is contained in:
parent
9e382e8d29
commit
8b2c91836b
|
@ -193,12 +193,10 @@ class CaptureManager(object):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
@pytest.hookimpl(hookwrapper=True)
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtest_logstart(self, item):
|
def pytest_runtest_protocol(self, item):
|
||||||
self._current_item = item
|
|
||||||
|
|
||||||
@pytest.hookimpl(hookwrapper=True)
|
|
||||||
def pytest_runtest_logfinish(self, item):
|
|
||||||
self._current_item = item
|
self._current_item = item
|
||||||
|
yield
|
||||||
|
self._current_item = None
|
||||||
|
|
||||||
@pytest.hookimpl(hookwrapper=True)
|
@pytest.hookimpl(hookwrapper=True)
|
||||||
def pytest_runtest_setup(self, item):
|
def pytest_runtest_setup(self, item):
|
||||||
|
@ -329,7 +327,7 @@ class CaptureFixture(object):
|
||||||
|
|
||||||
def _start(self):
|
def _start(self):
|
||||||
# Start if not started yet
|
# Start if not started yet
|
||||||
if getattr(self, "_capture", None) is not None:
|
if getattr(self, "_capture", None) is None:
|
||||||
self._capture = MultiCapture(
|
self._capture = MultiCapture(
|
||||||
out=True, err=True, in_=False, Capture=self.captureclass
|
out=True, err=True, in_=False, Capture=self.captureclass
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue