mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 07:41:51 +08:00
Remove force_unicode
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
from textwrap import dedent
|
||||
|
||||
from jedi._compatibility import force_unicode
|
||||
from jedi.inference.sys_path import _get_parent_dir_with_file, \
|
||||
_get_buildout_script_paths, check_sys_path_modifications
|
||||
|
||||
@@ -79,6 +78,5 @@ def test_path_from_sys_path_assignment(Script):
|
||||
sys.exit(important_package.main())""")
|
||||
|
||||
paths = check_module_test(Script, code)
|
||||
paths = list(map(force_unicode, paths))
|
||||
assert 1 not in paths
|
||||
assert '/home/test/.buildout/eggs/important_package.egg' in paths
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
from jedi._compatibility import force_unicode
|
||||
|
||||
|
||||
def test_module_attributes(Script):
|
||||
def_, = Script('__name__').complete()
|
||||
assert def_.name == '__name__'
|
||||
@@ -13,9 +10,9 @@ def test_module_attributes(Script):
|
||||
def test_module__file__(Script, environment):
|
||||
assert not Script('__file__').infer()
|
||||
def_, = Script('__file__', path='example.py').infer()
|
||||
value = force_unicode(def_._name._value.get_safe_value())
|
||||
value = def_._name._value.get_safe_value()
|
||||
assert value.endswith('example.py')
|
||||
|
||||
def_, = Script('import antigravity; antigravity.__file__').infer()
|
||||
value = force_unicode(def_._name._value.get_safe_value())
|
||||
value = def_._name._value.get_safe_value()
|
||||
assert value.endswith('.py')
|
||||
|
||||
Reference in New Issue
Block a user