stop exposing capsys/capfd.capture
This commit is contained in:
parent
ac2f2b1deb
commit
8976b3ee0e
|
@ -18,6 +18,8 @@ UNRELEASED
|
|||
- copy, cleanup and integrate py.io capture
|
||||
from pylib 1.4.20.dev2 (rev 13d9af95547e)
|
||||
|
||||
- make capfd/capsys.capture private, its unused and shouldnt be exposed
|
||||
|
||||
|
||||
2.5.1
|
||||
-----------------------------------
|
||||
|
|
|
@ -283,20 +283,20 @@ def pytest_funcarg__capfd(request):
|
|||
|
||||
class CaptureFixture:
|
||||
def __init__(self, captureclass):
|
||||
self.capture = captureclass(now=False)
|
||||
self._capture = captureclass(now=False)
|
||||
|
||||
def _start(self):
|
||||
self.capture.startall()
|
||||
self._capture.startall()
|
||||
|
||||
def _finalize(self):
|
||||
if hasattr(self, 'capture'):
|
||||
outerr = self._outerr = self.capture.reset()
|
||||
del self.capture
|
||||
outerr = self._outerr = self._capture.reset()
|
||||
del self._capture
|
||||
return outerr
|
||||
|
||||
def readouterr(self):
|
||||
try:
|
||||
return self.capture.readouterr()
|
||||
return self._capture.readouterr()
|
||||
except AttributeError:
|
||||
return self._outerr
|
||||
|
||||
|
|
Loading…
Reference in New Issue