summaryrefslogtreecommitdiff
path: root/testing/test_doctest.py
diff options
context:
space:
mode:
authorJohn T. Wodder II <git@varonathe.org>2018-06-14 20:00:38 +0000
committerJohn T. Wodder II <git@varonathe.org>2018-06-15 17:23:49 +0000
commit5221a147640ca2da975c32a238d27b295cc3e095 (patch)
tree744c06e13b32cf7c1e40e96fcd48f0eff7fb496b /testing/test_doctest.py
parent4d0297b4138b694e1d99f4c8147aaf06d725d0f4 (diff)
downloadpytest-5221a147640ca2da975c32a238d27b295cc3e095.tar.gz
Failing test case for #3583
Diffstat (limited to 'testing/test_doctest.py')
-rw-r--r--testing/test_doctest.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/test_doctest.py b/testing/test_doctest.py
index 8ef7cfd65..7f3aff3b0 100644
--- a/testing/test_doctest.py
+++ b/testing/test_doctest.py
@@ -655,6 +655,22 @@ class TestDoctests(object):
result = testdir.runpytest(p, "--doctest-modules")
result.stdout.fnmatch_lines(["* 1 passed *"])
+ def test_print_unicode_value(self, testdir):
+ """
+ Test case for issue 3583: Printing Unicode in doctest under Python 2.7
+ doesn't work
+ """
+ p = testdir.maketxtfile(
+ test_print_unicode_value=r"""
+ Here is a doctest::
+
+ >>> print(u'\xE5\xE9\xEE\xF8\xFC')
+ åéîøü
+ """
+ )
+ result = testdir.runpytest(p)
+ result.stdout.fnmatch_lines(["* 1 passed *"])
+
def test_reportinfo(self, testdir):
"""
Test case to make sure that DoctestItem.reportinfo() returns lineno.