mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Add tests for decorator completion
This commit is contained in:
@@ -83,3 +83,19 @@ def test_method_completion():
|
|||||||
else:
|
else:
|
||||||
result = ['__func__']
|
result = ['__func__']
|
||||||
assert [c.name for c in Script(code).completions()] == result
|
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