Skip to content

Commit 929912d

Browse files
author
Manuel Krebber
committed
Changed the tests to pass on python 2 as well.
1 parent d254c6b commit 929912d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

testing/test_doctest.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def test_encoding_ascii(self, testdir):
146146
def test_encoding_latin1(self, testdir):
147147
"""Test support for --doctest-encoding option.
148148
"""
149-
testdir._makefile(".txt", ["""
150-
>>> 'üäö'
151-
'üäö'
149+
testdir._makefile(".txt", [u"""
150+
>>> len(u'üäö')
151+
3
152152
"""], {}, encoding='latin1')
153153

154154
result = testdir.runpytest("--doctest-encoding=latin1")
@@ -160,9 +160,9 @@ def test_encoding_latin1(self, testdir):
160160
def test_encoding_utf8(self, testdir):
161161
"""Test support for --doctest-encoding option.
162162
"""
163-
testdir.maketxtfile("""
164-
>>> 'üäö'
165-
'üäö'
163+
testdir.maketxtfile(u"""
164+
>>> len(u'üäö')
165+
3
166166
""")
167167

168168
result = testdir.runpytest()

0 commit comments

Comments
 (0)