mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-20 09:48:26 +08:00
Merge branch 'master' into typeshed
This commit is contained in:
@@ -132,7 +132,6 @@ def test_async(Script, environment):
|
||||
hey = 3
|
||||
ho'''
|
||||
)
|
||||
print(code)
|
||||
comps = Script(code, column=4).completions()
|
||||
names = [c.name for c in comps]
|
||||
assert 'foo' in names
|
||||
|
||||
@@ -70,11 +70,7 @@ def test_method_completion(Script, environment):
|
||||
|
||||
foo = Foo()
|
||||
foo.bar.__func__''')
|
||||
if environment.version_info.major > 2:
|
||||
result = []
|
||||
else:
|
||||
result = ['__func__']
|
||||
assert [c.name for c in Script(code).completions()] == result
|
||||
assert [c.name for c in Script(code).completions()] == ['__func__']
|
||||
|
||||
|
||||
def test_time_docstring(Script):
|
||||
|
||||
@@ -77,10 +77,13 @@ def test_nested_namespace_package(Script):
|
||||
assert len(result) == 1
|
||||
|
||||
|
||||
def test_relative_import(Script, tmpdir):
|
||||
def test_relative_import(Script, environment, tmpdir):
|
||||
"""
|
||||
Attempt a relative import in a very simple namespace package.
|
||||
"""
|
||||
if environment.version_info < (3, 4):
|
||||
pytest.skip()
|
||||
|
||||
directory = get_example_dir('namespace_package_relative_import')
|
||||
# Need to copy the content in a directory where there's no __init__.py.
|
||||
py.path.local(directory).copy(tmpdir)
|
||||
|
||||
Reference in New Issue
Block a user