From adcb28f61b65bc1a3913fdd33da0aa421f656278 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 27 Feb 2018 17:32:34 -0300 Subject: [PATCH] Add caplog to reference --- doc/en/logging.rst | 6 ++---- doc/en/reference.rst | 13 ++++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/en/logging.rst b/doc/en/logging.rst index 82119043b..524f6edd8 100644 --- a/doc/en/logging.rst +++ b/doc/en/logging.rst @@ -160,11 +160,9 @@ the records for the ``setup`` and ``call`` stages during teardown like so: pytest.fail('warning messages encountered during testing: {}'.format(messages)) -caplog fixture API -~~~~~~~~~~~~~~~~~~ -.. autoclass:: _pytest.logging.LogCaptureFixture - :members: +The full API is available at :class:`_pytest.logging.LogCaptureFixture`. + .. _live_logs: diff --git a/doc/en/reference.rst b/doc/en/reference.rst index 21ec13a43..fa39f1ac7 100644 --- a/doc/en/reference.rst +++ b/doc/en/reference.rst @@ -5,7 +5,7 @@ Reference This page contains the full reference to pytest's API. .. contents:: - :depth: 2 + :depth: 3 :local: @@ -423,3 +423,14 @@ record_xml_property ~~~~~~~~~~~~~~~~~~~ .. autofunction:: _pytest.junitxml.record_xml_property() + +caplog +~~~~~~ + +.. autofunction:: _pytest.logging.caplog() + :no-auto-options: + + This returns a :class:`_pytest.logging.LogCaptureFixture`. + +.. autoclass:: _pytest.logging.LogCaptureFixture + :members: