Enable bytes capturing of writes to file descriptors ``1`` and ``2``. The captured output is made available via ``capfd.readouterr()`` method calls, which return a ``(out, err)`` namedtuple. ``out`` and ``err`` will be ``byte`` objects.
(request: SubRequest)
| 927 | |
| 928 | @fixture |
| 929 | def capfdbinary(request: SubRequest) -> Generator[CaptureFixture[bytes], None, None]: |
| 930 | """Enable bytes capturing of writes to file descriptors ``1`` and ``2``. |
| 931 | |
| 932 | The captured output is made available via ``capfd.readouterr()`` method |
| 933 | calls, which return a ``(out, err)`` namedtuple. |
| 934 | ``out`` and ``err`` will be ``byte`` objects. |
| 935 | """ |
| 936 | capman = request.config.pluginmanager.getplugin("capturemanager") |
| 937 | capture_fixture = CaptureFixture[bytes](FDCaptureBinary, request, _ispytest=True) |
| 938 | capman.set_fixture(capture_fixture) |
| 939 | capture_fixture._start() |
| 940 | yield capture_fixture |
| 941 | capture_fixture.close() |
| 942 | capman.unset_fixture() |
nothing calls this directly
no test coverage detected