Author: Philip Jenvey <pjen...@underboss.org> Branch: py3k Changeset: r71524:d67eb7fe33cd Date: 2014-05-14 12:10 -0700 http://bitbucket.org/pypy/pypy/changeset/d67eb7fe33cd/
Log: fix potential UnicodeEncodeErrors under pytest.py --resultlog: the captured output may come in as unicode (grafted from ef6d8454c0a6cd10097c82056727f5cef8b7830e) diff --git a/_pytest/resultlog.py b/_pytest/resultlog.py --- a/_pytest/resultlog.py +++ b/_pytest/resultlog.py @@ -56,6 +56,9 @@ for line in longrepr.splitlines(): py.builtin.print_(" %s" % line, file=self.logfile) for key, text in sections: + # py.io.StdCaptureFD may send in unicode + if isinstance(text, unicode): + text = text.encode('utf-8') py.builtin.print_(" ", file=self.logfile) py.builtin.print_(" -------------------- %s --------------------" % key.rstrip(), file=self.logfile) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit