1 new commit in pytest: https://bitbucket.org/hpk42/pytest/commits/c15664850085/ Changeset: c15664850085 User: hpk42 Date: 2014-04-07 13:42:48 Summary: fix issue439: clarify that capsys/capfd capture output during test execution, not test setup. Affected #: 1 file
diff -r 393981dc0f1da8a2699ed4c8bc43f3644af592f9 -r c15664850085ac1b38d81b5fb3b30cd48c25f2db doc/en/capture.txt --- a/doc/en/capture.txt +++ b/doc/en/capture.txt @@ -84,11 +84,9 @@ Accessing captured output from a test function --------------------------------------------------- -The :ref:`funcarg mechanism` allows test function a very easy -way to access the captured output by simply using the names -``capsys`` or ``capfd`` in the test function signature. Here -is an example test function that performs some output related -checks:: +The ``capsys`` and ``capfd`` fixtures allow to access stdout/stderr +output created during test execution. Here is an example test function +that performs some output related checks:: def test_myoutput(capsys): # or use "capfd" for fd-level print ("hello") @@ -108,8 +106,10 @@ output streams and also interacts well with pytest's own per-test capturing. -If you want to capture on ``fd`` level you can use +If you want to capture on filedescriptor level you can use the ``capfd`` function argument which offers the exact -same interface. +same interface but allows to also capture output from +libraries or subprocesses that directly write to operating +system level output streams (FD1 and FD2). .. include:: links.inc Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit