[Py2] UnicodeDecodeError in doctest with Unicode #2434
Save this file as
.. doctest:: >>> print( ... "Hi\n\nByé") Hi ... Byé >>> 1/0 1
on pytest 3.1.0 with Python 2.7.11, observe lengthy stacktrace ending with a
The text was updated successfully, but these errors were encountered:
I was still able to reproduce this issue in pytest 3.1.2 with the following file:
# -*- encoding: utf-8 -*- from __future__ import unicode_literals def fix_bad_unicode(text): """ >>> print fix_bad_unicode('Ãºnico') único """ return "único"
For what it's worth: I made this file while debugging the same error generated by the file embedded in this blog post.