Add docs for CaptureFixture

This commit is contained in:
Bruno Oliveira 2018-03-01 23:33:21 -03:00
parent 3979f9ba3a
commit 18a47bfd22
2 changed files with 5 additions and 3 deletions

View File

@ -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()

View File

@ -264,6 +264,9 @@ capsys
captured = capsys.readouterr()
assert captured.out == "hello\n"
.. autoclass:: CaptureFixture()
:members:
capsysbinary
~~~~~~~~~~~~