GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — capture: keep all output for "Captured stdout call" etc · Issue #3448 · pytest-dev/pytest

capture: keep all output for "Captured stdout call" etc #3448

New issue
Copy link
New issue
Copy link
Closed
Closed
capture: keep all output for "Captured stdout call" etc#3448
Copy link
Labels
plugin: capturerelated to the capture builtin plugintype: enhancementnew feature or API change, should be merged into features branch

Description

@blueyed
blueyed
opened on May 4, 2018
Issue body actions

It looks like using capfd.readouterr() in a test also resets what pytest displays in case of failed tests.

For this I think it would be useful to keep the output in total.

capfd = <_pytest.capture.CaptureFixture object at 0x7fc6da051908>

    def test_capfd(capfd):
        print('stdout')
        print(2, capfd.readouterr())
        print(3)
>       assert 0
E       assert 0

tests/test_capfd.py:11: AssertionError
----------------------------------- Captured stdout call ------------------------------------
2 CaptureResult(out='stdout\n', err='')
3

Here the stdout is missing.

pytest master (08aed1a).

Activity

  1. blueyed
    added
    plugin: capturerelated to the capture builtin plugin
    on May 4, 2018
  2. nicoddemus
    added
    type: enhancementnew feature or API change, should be merged into features branch
    on May 4, 2018
  3. blueyed
    closed this as completedon Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: capturerelated to the capture builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.