mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Add an extract test for methods without params
This commit is contained in:
@@ -395,6 +395,21 @@ class X:
|
|||||||
return self.ab(local1, b)
|
return self.ab(local1, b)
|
||||||
# bar
|
# bar
|
||||||
local2
|
local2
|
||||||
|
# -------------------------------------------------- in-method-no-param
|
||||||
|
glob1 = 1
|
||||||
|
class X:
|
||||||
|
def f():
|
||||||
|
#? 11 text {'new_name': 'ab', 'until_line': 5, 'until_column': 22}
|
||||||
|
return glob1 + 2
|
||||||
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
glob1 = 1
|
||||||
|
class X:
|
||||||
|
def ab():
|
||||||
|
return glob1 + 2
|
||||||
|
|
||||||
|
def f():
|
||||||
|
#? 11 text {'new_name': 'ab', 'until_line': 5, 'until_column': 22}
|
||||||
|
return ab()
|
||||||
# -------------------------------------------------- random-return-1
|
# -------------------------------------------------- random-return-1
|
||||||
def x():
|
def x():
|
||||||
#? 0 error {'new_name': 'ab', 'until_line': 5, 'until_column': 10}
|
#? 0 error {'new_name': 'ab', 'until_line': 5, 'until_column': 10}
|
||||||
|
|||||||
Reference in New Issue
Block a user