fixed a unicode test problem

This commit is contained in:
David Halter
2013-07-18 14:54:40 +02:00
parent 681b9d6371
commit dd6967de7c
3 changed files with 12 additions and 3 deletions

View File

@@ -105,7 +105,7 @@ if __name__ == '__main__':
sys.path.insert(0, '..')
import jedi
from jedi._compatibility import unicode, reduce, StringIO
from jedi._compatibility import unicode, reduce, StringIO, is_py3k
TEST_COMPLETIONS = 0
@@ -221,7 +221,8 @@ def collect_file_tests(lines, lines_to_execute):
test_type = None
for line_nr, line in enumerate(lines):
line_nr += 1 # py2.5 doesn't know about the additional enumerate param
line = unicode(line)
if not is_py3k:
line = unicode(line, 'UTF-8')
if correct:
r = re.match('^(\d+)\s*(.*)$', correct)
if r: