Skip to content

Add tee-fd capture mode and capteefd fixtures#14432

Open
FazeelUsmani wants to merge 12 commits intopytest-dev:mainfrom
FazeelUsmani:tee-fd-capture
Open

Add tee-fd capture mode and capteefd fixtures#14432
FazeelUsmani wants to merge 12 commits intopytest-dev:mainfrom
FazeelUsmani:tee-fd-capture

Conversation

@FazeelUsmani
Copy link
Copy Markdown
Contributor

Summary

This PR implements --capture=tee-fd mode and capteefd/capteefdbinary fixtures, addressing issue #14159.

The new capture mode enables FD-level capture (including subprocess output) while simultaneously passing output through to the terminal in real-time.

closes #14159

Changes

  • Add --capture=tee-fd CLI option
  • Add capteefd and capteefdbinary fixtures
  • Implement FDCaptureTee and FDCaptureBinaryTee classes using pipe+thread architecture
  • Platform-specific implementations for Unix (using select) and Windows (using queue-based approach)
  • Add comprehensive tests for the new capture mode
  • Update documentation

Test Plan

  • Run pytest testing/test_capture.py::TestFDCaptureTee - 11 tests pass
  • Run pytest testing/test_capture.py::TestCaptureFixture::test_capteefd - fixture tests pass
  • Verified no regressions in existing capture tests

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tee-fd/capteefd - file descriptor level capture with pass-through

1 participant