mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Move the last test out of test_regressions and delete the file
This also deletes a test that probably has become useful because the issue it tested was caused by code that doesn't exist anymore
This commit is contained in:
@@ -273,3 +273,15 @@ def test_no_statement_parent(Script):
|
||||
defs = Script(source, column=3).goto_definitions()
|
||||
defs = sorted(defs, key=lambda d: d.line)
|
||||
assert [d.description for d in defs] == ['def f', 'class C']
|
||||
|
||||
|
||||
def test_backslash_continuation_and_bracket(Script):
|
||||
code = dedent(r"""
|
||||
x = 0
|
||||
a = \
|
||||
[1, 2, 3, (x)]""")
|
||||
|
||||
lines = code.splitlines()
|
||||
column = lines[-1].index('(')
|
||||
def_, = Script(code, line=len(lines), column=column).goto_definitions()
|
||||
assert def_.name == 'int'
|
||||
|
||||
Reference in New Issue
Block a user