mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Add tests for decorator completion
This commit is contained in:
@@ -83,3 +83,19 @@ 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