diff --git a/changelog/3888.bugfix.rst b/changelog/3888.bugfix.rst new file mode 100644 index 00000000000..17e00a82848 --- /dev/null +++ b/changelog/3888.bugfix.rst @@ -0,0 +1 @@ +Fix macOS specific code using ``capturemanager`` plugin in doctests. diff --git a/src/_pytest/doctest.py b/src/_pytest/doctest.py index 57d3367e403..12b871f9fa3 100644 --- a/src/_pytest/doctest.py +++ b/src/_pytest/doctest.py @@ -203,7 +203,8 @@ def _disable_output_capturing_for_darwin(self): return capman = self.config.pluginmanager.getplugin("capturemanager") if capman: - out, err = capman.suspend_global_capture(in_=True) + capman.suspend_global_capture(in_=True) + out, err = capman.read_global_capture() sys.stdout.write(out) sys.stderr.write(err)