Skip to content

capsys.readouterr does not capture output from the Out class #622

@Keonik1

Description

@Keonik1

Problem: Keonik1#2 (comment)

Brief description:

capsys.readouterr() does not read messages that are output via the Out class and the Out.green, Out.red, Out.yellow functions themselves.

The likely reason is that Out redirects output directly to stdout, consoles, rather than to Python's stdout, which is redefined by pytest.

Maybe this will be usefull: https://stackoverflow.com/a/52844694

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions