Skip to content

Fix typo in caplog fixture documentation: Issue #3406 #3407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions _pytest/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ def caplog(request):

Captured logs are available through the following methods::

* caplog.text() -> string containing formatted log output
* caplog.records() -> list of logging.LogRecord instances
* caplog.record_tuples() -> list of (logger_name, level, message) tuples
* caplog.text -> string containing formatted log output
* caplog.records -> list of logging.LogRecord instances
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
"""
result = LogCaptureFixture(request.node)
Expand Down
1 change: 1 addition & 0 deletions changelog/3406.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix typo in ``caplog`` fixture documentation, which incorrectly identified certain attributes as methods.
6 changes: 3 additions & 3 deletions doc/en/builtin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a

Captured logs are available through the following methods::

* caplog.text() -> string containing formatted log output
* caplog.records() -> list of logging.LogRecord instances
* caplog.record_tuples() -> list of (logger_name, level, message) tuples
* caplog.text -> string containing formatted log output
* caplog.records -> list of logging.LogRecord instances
* caplog.record_tuples -> list of (logger_name, level, message) tuples
* caplog.clear() -> clear captured records and formatted log output string
monkeypatch
The returned ``monkeypatch`` fixture provides these
Expand Down