-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Py2] UnicodeDecodeError in doctest with Unicode #2434
Comments
Thanks for the report and the reproducible example, we appreciate it. |
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" Save as For what it's worth: I made this file while debugging the same error generated by the file embedded in this blog post. |
Indeed I can reproduce the problem using you example, thanks! |
I don't have time to come up with another reproducer, but this issue is not entirely fixed: https://gitlab.tiker.net/inducer/loopy/-/jobs/40102. |
Save this file as
x.rst
:Run with
on pytest 3.1.0 with Python 2.7.11, observe lengthy stacktrace ending with a
UnicodeDecodeError
in_ellipsis_match
. Pytest 3.0.4 works fine.The text was updated successfully, but these errors were encountered: