-
-
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
Unicode issues with pytest.fail #2258
Comments
What if you do the same with |
It works fine:
|
I was able to produce a similar version of this in mac os on python 3.5.3 and pytest 3.6.0
|
hello, first off thank you for the issue! python 2.x support has ended for pytest core. we've decided in #7296 to close the python-2-specific issues to free up some space in our backlog. however, in accordance to our python 2.7 and 3.4 support community patches will still be accepted to the |
Hello!
I'm passing a unicode-encoded string to
pytest.fail
with non-ascii symbols, e.g.pytest.fail(u'фыв'.encode('utf-8'))
and I'm getting an invalid output�
. Removing.encode('utf-8')
restores things back to normal:I've also ran into troubles using this with Jenkins CI (v2.41). Whenever I pass
u'фыв'
without.encode('utf-8')
, py.test encodes it usingunicode escape
codec so I get\u0444\u044b\u0432
. If I addexport PYTHONIOENCODING=utf-8
before executingpy.test
, I get�
(even without.encode('utf-8')
).Reproduced it in mac os and ubuntu 12.04. Python version is 2.7.13, also reproduces with 2.7.3. Py.test version is 3.0.6.
LC_ALL
and similar settings all set toen_US.UTF-8
both in Jenkins and in my terminal.The text was updated successfully, but these errors were encountered: