Skip to content

Please make verbose XFAIL tracebacks optional #12231

Closed
@mgorny

Description

@mgorny

What's the problem this feature will solve?

Since #11735, -rx causes pytest to output tracebacks for expected failures. This is sometimes undesirable with projects that have a lot of xfail-ing tests. For example, with pandas outputting XFAIL tracebacks takes a few minutes and results in 80M of output.

Describe the solution you'd like

I think the cleanest solution would be to have another option to control whether tracebacks are displayed for XFAILs. This would make it possible to retain XFAIL in summary output (via -rx or -ra), without the extra overhead of printing all the tracebacks.

Alternative Solutions

We could avoid passing -rx, but then we'd lose the list of XFAILs from test summary, and that one is actually desirable.

Additional context

n/a

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