diff --git a/python/testData/copyPaste/multiLine/IndentFunction.after.py b/python/testData/copyPaste/multiLine/IndentFunction.after.py new file mode 100644 index 000000000000..f318de418c1f --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentFunction.after.py @@ -0,0 +1,10 @@ +class C: + def foo(self): + y = 2 + + def foo(self): + x = 1 + y = 2 + + def bar(self): + y = 2 \ No newline at end of file diff --git a/python/testData/copyPaste/multiLine/IndentFunction.dst.py b/python/testData/copyPaste/multiLine/IndentFunction.dst.py new file mode 100644 index 000000000000..ef9d573b9b18 --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentFunction.dst.py @@ -0,0 +1,8 @@ +class C: + def foo(self): + y = 2 + + + + def bar(self): + y = 2 \ No newline at end of file diff --git a/python/testData/copyPaste/multiLine/IndentFunction.src.py b/python/testData/copyPaste/multiLine/IndentFunction.src.py new file mode 100644 index 000000000000..8825aa8554cf --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentFunction.src.py @@ -0,0 +1,5 @@ +class C: + def foo(self): + x = 1 + y = 2 + \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java b/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java index ab16b1a19ea7..932aa6b69ecd 100644 --- a/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java +++ b/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java @@ -147,6 +147,10 @@ public class PyCopyPasteTest extends PyTestCase { doTestMultiLine(); } + public void testIndentFunction() { + doTestMultiLine(); + } + private void doTest() { String name = getTestName(false);