mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Some sother small test improvements
This commit is contained in:
51
test/refactor/extract_variable.py
Normal file
51
test/refactor/extract_variable.py
Normal file
@@ -0,0 +1,51 @@
|
||||
# -------------------------------------------------- simple-1
|
||||
def test():
|
||||
#? 35 {'new_name': 'a'}
|
||||
return test(100, (30 + b, c) + 1)
|
||||
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 35 {'new_name': 'a'}
|
||||
a = (30 + b, c) + 1
|
||||
return test(100, a)
|
||||
|
||||
|
||||
# -------------------------------------------------- simple-2
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
return test(100, (30 + b, c) + 1)
|
||||
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
a = 30 + b
|
||||
return test(100, (a, c) + 1)
|
||||
|
||||
|
||||
# -------------------------------------------------- multiline-1
|
||||
def test():
|
||||
#? 30 {'new_name': 'a'}
|
||||
return test(1, (30 + b, c)
|
||||
+ 1)
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 30 {'new_name': 'a'}
|
||||
x = ((30 + b, c)
|
||||
+ 1)
|
||||
return test(1, x
|
||||
)
|
||||
|
||||
|
||||
# -------------------------------------------------- multiline-2
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
return test(1, (30 + b, c)
|
||||
+ 1)
|
||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
def test():
|
||||
#? 25 {'new_name': 'a'}
|
||||
x = 30 + b
|
||||
return test(1, (x, c)
|
||||
+ 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user