From 4131d3f300196da059f5abe6d36f4870459692ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 17 Feb 2018 12:13:33 -0500 Subject: [PATCH] Probably it's best to write the err stream to stderr. --- _pytest/doctest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/doctest.py b/_pytest/doctest.py index d61efebe7..f54f833ec 100644 --- a/_pytest/doctest.py +++ b/_pytest/doctest.py @@ -118,7 +118,7 @@ class DoctestItem(pytest.Item): if capman: out, err = capman.suspend_global_capture(in_=True) sys.stdout.write(out) - sys.stdout.write(err) + sys.stderr.write(err) def repr_failure(self, excinfo): import doctest