Merge branch 'master' into typeshed

This commit is contained in:
Dave Halter
2018-08-03 00:26:09 +02:00
18 changed files with 101 additions and 109 deletions

View File

@@ -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

View File

@@ -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):

View File

@@ -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)