-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
I am stuck... please help to find a workaround!
In an otherwise empty directory I have a file named "test.txt" with two lines of text:
>>> print(u'Ä')
Ä
I verified whether my file is indeed UTF-8 encoded:
$ file test.txt
test.txt: UTF-8 Unicode text
When I run pytest on this, it fails with a UnicodeEncodeError.
Here is a full session log: https://bpaste.net/show/b0adfb13e3e3
When I remove the "u" (i.e. the output of the command being tested is itself encoded), then pytest works well and says that the test passed. The problem occurs only under Python 2 and only when I want to test unicode output which contains non-ascii text.
Reproduced on several machines with
pytest version 3.2.1 and 3.2.2.dev17+g539523c (current clone)
Python 2.7.9 and 2.7.12
Thanks for any suggesteions.
Luc
Metadata
Metadata
Assignees
Labels
plugin: doctestsrelated to the doctests builtin pluginrelated to the doctests builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed