Changed the tests to pass on python 2 as well.

This commit is contained in:
Manuel Krebber 2016-11-29 14:51:17 +01:00
parent d254c6b0ae
commit 929912de29
1 changed files with 6 additions and 6 deletions

View File

@ -146,9 +146,9 @@ class TestDoctests:
def test_encoding_latin1(self, testdir):
"""Test support for --doctest-encoding option.
"""
testdir._makefile(".txt", ["""
>>> 'üäö'
'üäö'
testdir._makefile(".txt", [u"""
>>> len(u'üäö')
3
"""], {}, encoding='latin1')
result = testdir.runpytest("--doctest-encoding=latin1")
@ -160,9 +160,9 @@ class TestDoctests:
def test_encoding_utf8(self, testdir):
"""Test support for --doctest-encoding option.
"""
testdir.maketxtfile("""
>>> 'üäö'
'üäö'
testdir.maketxtfile(u"""
>>> len(u'üäö')
3
""")
result = testdir.runpytest()