From d069a4e48281dc7df4da7fbf7cf5d8b361018af7 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sun, 23 Feb 2020 01:41:51 +0100 Subject: [PATCH] Add a test for extraction in a class --- test/refactor/extract_function.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/refactor/extract_function.py b/test/refactor/extract_function.py index e582e329..d3e0127f 100644 --- a/test/refactor/extract_function.py +++ b/test/refactor/extract_function.py @@ -92,3 +92,17 @@ class X(int): def f(x): #? 16 text {'new_name': 'ab'} return ab() +# -------------------------------------------------- in-class-1 +class Ya(): + a = 3 + #? 11 text {'new_name': 'f'} + c = a + 2 +# ++++++++++++++++++++++++++++++++++++++++++++++++++ +def f(): + return a + 2 + + +class Ya(): + a = 3 + #? 11 text {'new_name': 'f'} + c = f()