STINNER Victor added the comment: It looks like a bug in the "suspicious" tool which should skip preformatted blocks (blocks starting with "::").
+don't provide any options to redirect it:: + + >>> import contextlib, io, logging + >>> f = io.StringIO() + >>> with contextlib.redirect_stderr(f): + ... logging.warning('warning') + ... + >>> f.getvalue() + 'WARNING:root:warning\n' + +(Contributed by Berker Peksag in :issue:`22389`.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25105> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com