mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 23:34:45 +08:00
Cleanup a test file
This commit is contained in:
@@ -8,13 +8,10 @@ import pytest
|
|||||||
|
|
||||||
import jedi
|
import jedi
|
||||||
from jedi import __doc__ as jedi_doc, names
|
from jedi import __doc__ as jedi_doc, names
|
||||||
from ..helpers import TestCase
|
|
||||||
from jedi.evaluate.compiled import CompiledContextName
|
from jedi.evaluate.compiled import CompiledContextName
|
||||||
|
|
||||||
|
|
||||||
def test_is_keyword(Script):
|
def test_is_keyword(Script):
|
||||||
#results = Script('import ', 1, 1, None).goto_definitions()
|
|
||||||
#assert len(results) == 1 and results[0].is_keyword is True
|
|
||||||
results = Script('str', 1, 1, None).goto_definitions()
|
results = Script('str', 1, 1, None).goto_definitions()
|
||||||
assert len(results) == 1 and results[0].is_keyword is False
|
assert len(results) == 1 and results[0].is_keyword is False
|
||||||
|
|
||||||
@@ -140,28 +137,32 @@ def test_completion_docstring(Script, jedi_path):
|
|||||||
|
|
||||||
docstr('abcd=3;abcd', '')
|
docstr('abcd=3;abcd', '')
|
||||||
docstr('"hello"\nabcd=3\nabcd', '')
|
docstr('"hello"\nabcd=3\nabcd', '')
|
||||||
docstr(dedent('''
|
docstr(
|
||||||
|
dedent('''
|
||||||
def x():
|
def x():
|
||||||
"hello"
|
"hello"
|
||||||
0
|
0
|
||||||
x'''),
|
x'''),
|
||||||
'hello'
|
'hello'
|
||||||
)
|
)
|
||||||
docstr(dedent('''
|
docstr(
|
||||||
|
dedent('''
|
||||||
def x():
|
def x():
|
||||||
"hello";0
|
"hello";0
|
||||||
x'''),
|
x'''),
|
||||||
'hello'
|
'hello'
|
||||||
)
|
)
|
||||||
# Shouldn't work with a tuple.
|
# Shouldn't work with a tuple.
|
||||||
docstr(dedent('''
|
docstr(
|
||||||
|
dedent('''
|
||||||
def x():
|
def x():
|
||||||
"hello",0
|
"hello",0
|
||||||
x'''),
|
x'''),
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
# Should also not work if we rename something.
|
# Should also not work if we rename something.
|
||||||
docstr(dedent('''
|
docstr(
|
||||||
|
dedent('''
|
||||||
def x():
|
def x():
|
||||||
"hello"
|
"hello"
|
||||||
y = x
|
y = x
|
||||||
|
|||||||
Reference in New Issue
Block a user