Skip to content

separate reporting -r and output capture to allow -rA to NOT report output for passing tests #13959

@okken

Description

@okken

What's the problem this feature will solve?

The -r flag controls both summary report and output capture reporting.
Really, it'd be nice to have those separate.

For large tests suites, -ra is often used to report the reason for non-passing tests per test in the summary.
For small test suites, -rA is common, as it lists all tests in the summary, including passing.

However, it also reports captured output.
I know there is --show-capture=no. But that turns off showing captured output for failures also.

Describe the solution you'd like

I'd like a way to separate -r functionality into:

  • which outcomes should show summary reports
  • which outcomes should show captured output

However, I know -r is legacy and the default behavior can't change.

But maybe some other way to turn off capture for everything.
These are verbose, but maybe --capture-on that takes chars that matches the -r chars.

So -rA --capture-on=a would report on all, including passing, but capture on all except passing.

The default behavior could stay with "whatever -r" is set to.

Alternative Solutions

Different flag or option name is ok.

Additional context

We had a similar issue with tracebacks, and added --xfail-tb to deal with that.
But output capture is still an issue, and a surprising one, as the documentation for -rA doesn't mention that it turns on passing output capture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: capturerelated to the capture builtin plugintopic: configrelated to config handling, argument parsing and config filetype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions