Skip to content
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

caplog documentation is incorrect #3406

OrangeDog opened this issue Apr 17, 2018 · 2 comments

caplog documentation is incorrect #3406

OrangeDog opened this issue Apr 17, 2018 · 2 comments


Copy link

@OrangeDog OrangeDog commented Apr 17, 2018

As seen here:

    Access and control log capturing.

    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.clear()         -> clear captured records and formatted log output string

However, text, records and record_tuples are properties. Using them as described results in an exception:

TypeError: 'list' object is not callable

Copy link

@pytestbot pytestbot commented Apr 17, 2018 thinks possibly related issues are #584 ("example/special" documentation seems incorrect), #452 (Incorrect capfd description/documentation), #1068 (Wrong documentation), #411 (Documentation: misleading deep inspection), and #538 (Fixture scope documentation).

Copy link

@rachel1792 rachel1792 commented Apr 17, 2018

Yes, you seem to have found an error in the docs. @nicoddemus @RonnyPfannschmidt , can I take a stab at a PR? I'm a first-time contributor :)

nicoddemus added a commit that referenced this issue Apr 20, 2018
Fix typo in caplog fixture documentation: Issue #3406
@nicoddemus nicoddemus closed this Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants