Add docs for CaptureFixture
This commit is contained in:
parent
3979f9ba3a
commit
18a47bfd22
|
@ -292,10 +292,9 @@ class CaptureFixture(object):
|
|||
cap.stop_capturing()
|
||||
|
||||
def readouterr(self):
|
||||
"""Read and return the captured output so far.
|
||||
"""Read and return the captured output so far, resetting the internal buffer.
|
||||
|
||||
:rtype: Tuple[str, str]
|
||||
:return: captured content as a pair of (stdout, stdout) strings
|
||||
:return: captured content as a namedtuple with ``out`` and ``err`` string attributes
|
||||
"""
|
||||
try:
|
||||
return self._capture.readouterr()
|
||||
|
|
|
@ -264,6 +264,9 @@ capsys
|
|||
captured = capsys.readouterr()
|
||||
assert captured.out == "hello\n"
|
||||
|
||||
.. autoclass:: CaptureFixture()
|
||||
:members:
|
||||
|
||||
|
||||
capsysbinary
|
||||
~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue