Add a method extract test

This commit is contained in:
Dave Halter
2020-02-26 01:11:04 +01:00
parent bb6f0d5e91
commit c96994dd8d

View File

@@ -298,7 +298,7 @@ def x(v1):
#bar
return x
x
# -------------------------------------------------- in-class-1
# -------------------------------------------------- in-class-range-1
class X1:
#? 11 text {'new_name': 'f', 'until_line': 4}
a = 3
@@ -313,3 +313,35 @@ def f():
class X1:
#? 11 text {'new_name': 'f', 'until_line': 4}
c = f()
# -------------------------------------------------- in-method-range-1
glob1 = 1
class X:
# ha
def g(self): pass
# haha
def f(self, b, c):
#? 11 text {'new_name': 'ab', 'until_line': 12, 'until_column': 28}
#foo
local1 = 3
local2 = 4
x= self.g() or self.f(b) ^ glob1 & b is local1
# bar
# ++++++++++++++++++++++++++++++++++++++++++++++++++
glob1 = 1
class X:
# ha
def g(self): pass
# haha
def ab(self, b):
#foo
local1 = 3
local2 = 4
x= self.g() or self.f(b) ^ glob1 & b is local1
return x
def f(self, b, c):
#? 11 text {'new_name': 'ab', 'until_line': 12, 'until_column': 28}
x = self.ab(b)
# bar