diff --git a/test/refactor/extract_function.py b/test/refactor/extract_function.py index 565691fa..04eae596 100644 --- a/test/refactor/extract_function.py +++ b/test/refactor/extract_function.py @@ -127,3 +127,17 @@ class Ya(): a = 3 #? 11 text {'new_name': 'f'} c = f(a) +# -------------------------------------------------- in-closure +def x(z): + def y(x): + #? 15 text {'new_name': 'f'} + return -x * z +# ++++++++++++++++++++++++++++++++++++++++++++++++++ +def f(x, z): + return -x * z + + +def x(z): + def y(x): + #? 15 text {'new_name': 'f'} + return f(x, z)