Commit a10d658b authored by Stefan Behnel's avatar Stefan Behnel

Fix test in Py2.

parent e17c8e54
# -*- coding: utf-8 -*-
import os.path import os.path
import unittest import unittest
import tempfile import tempfile
...@@ -25,7 +27,8 @@ class TestTestUtils(unittest.TestCase): ...@@ -25,7 +27,8 @@ class TestTestUtils(unittest.TestCase):
assert found == expected, repr(found) assert found == expected, repr(found)
def test_write_file_text(self): def test_write_file_text(self):
self._test_write_file("abcüöä", b'abc\xc3\xbc\xc3\xb6\xc3\xa4') text = u"abcüöä"
self._test_write_file(text, text.encode('utf8'))
def test_write_file_bytes(self): def test_write_file_bytes(self):
self._test_write_file(b"ab\0c", b"ab\0c") self._test_write_file(b"ab\0c", b"ab\0c")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment