Skip to content

Commit ab5af52

Browse files
Fix macOS specific code that uses capturemanager.
#3888 (comment) closes #3888 Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 9620b16 commit ab5af52

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog/3888.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix macOS specific code using ``capturemanager`` plugin in doctests.

src/_pytest/doctest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ def _disable_output_capturing_for_darwin(self):
203203
return
204204
capman = self.config.pluginmanager.getplugin("capturemanager")
205205
if capman:
206-
out, err = capman.suspend_global_capture(in_=True)
206+
capman.suspend_global_capture(in_=True)
207+
out, err = capman.read_global_capture()
207208
sys.stdout.write(out)
208209
sys.stderr.write(err)
209210

0 commit comments

Comments
 (0)