Issue #8533: Write tracebacks and failed tests to sys.stderr instead of
sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 4ea6c05..3c4d5d6 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1020,7 +1020,7 @@
 def _run_suite(suite):
     """Run tests from a unittest.TestSuite-derived class."""
     if verbose:
-        runner = unittest.TextTestRunner(sys.stdout, verbosity=2)
+        runner = unittest.TextTestRunner(sys.stderr, verbosity=2)
     else:
         runner = BasicTestRunner()