mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Move the tests for the last PR #848.
This commit is contained in:
@@ -304,3 +304,15 @@ class A():
|
||||
|
||||
#? int()
|
||||
A().ret()
|
||||
|
||||
|
||||
# -----------------
|
||||
# On decorator completions
|
||||
# -----------------
|
||||
|
||||
import abc
|
||||
#? ['abc']
|
||||
@abc
|
||||
|
||||
#? ['abstractmethod']
|
||||
@abc.abstractmethod''')
|
||||
|
||||
@@ -83,19 +83,3 @@ def test_method_completion():
|
||||
else:
|
||||
result = ['__func__']
|
||||
assert [c.name for c in Script(code).completions()] == result
|
||||
|
||||
|
||||
def test_decorator_global():
|
||||
code = dedent('''
|
||||
import abc
|
||||
@abc''')
|
||||
result = ['abc']
|
||||
assert [c.name for c in Script(code).completions()] == result
|
||||
|
||||
|
||||
def test_decorator_dotted():
|
||||
code = dedent('''
|
||||
import abc
|
||||
@abc.abstractmethod''')
|
||||
result = ['abstractmethod']
|
||||
assert [c.name for c in Script(code).completions()] == result
|
||||
|
||||
Reference in New Issue
Block a user