forked from VimPlug/jedi
fixed a unicode test problem
This commit is contained in:
@@ -14,7 +14,7 @@ from __future__ import with_statement
|
||||
import copy
|
||||
import itertools
|
||||
|
||||
from jedi._compatibility import use_metaclass, next, hasattr
|
||||
from jedi._compatibility import use_metaclass, next, hasattr, unicode
|
||||
from jedi import parsing_representation as pr
|
||||
from jedi import cache
|
||||
from jedi import helpers
|
||||
|
||||
@@ -231,3 +231,11 @@ class A():
|
||||
self.hello = {} # comment shouldn't be a string
|
||||
#? dict()
|
||||
A().hello
|
||||
|
||||
# -----------------
|
||||
# unicode
|
||||
# -----------------
|
||||
|
||||
a = 'smörbröd'
|
||||
#? str()
|
||||
a
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user