From 84cf35f70e0ed4a2066dbf3ee331a395a4990458 Mon Sep 17 00:00:00 2001 From: Ekaterina Tuzova Date: Fri, 6 Jul 2012 15:41:59 +0400 Subject: [PATCH] fixed PY-6887 Paste changes code logic when making top-level function inner --- .../copyPaste/multiLine/IndentInnerFunction1.after.py | 9 +++++++++ .../copyPaste/multiLine/IndentInnerFunction1.dst.py | 5 +++++ .../copyPaste/multiLine/IndentInnerFunction1.src.py | 4 ++++ python/testSrc/com/jetbrains/python/PyCopyPasteTest.java | 6 +++++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 python/testData/copyPaste/multiLine/IndentInnerFunction1.after.py create mode 100644 python/testData/copyPaste/multiLine/IndentInnerFunction1.dst.py create mode 100644 python/testData/copyPaste/multiLine/IndentInnerFunction1.src.py diff --git a/python/testData/copyPaste/multiLine/IndentInnerFunction1.after.py b/python/testData/copyPaste/multiLine/IndentInnerFunction1.after.py new file mode 100644 index 000000000000..49521da959a8 --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentInnerFunction1.after.py @@ -0,0 +1,9 @@ +def foo(self): + x = 1 + y = 2 + + def foo(self): + x = 1 + y = 2 + + z = 3 \ No newline at end of file diff --git a/python/testData/copyPaste/multiLine/IndentInnerFunction1.dst.py b/python/testData/copyPaste/multiLine/IndentInnerFunction1.dst.py new file mode 100644 index 000000000000..713925062da8 --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentInnerFunction1.dst.py @@ -0,0 +1,5 @@ +def foo(self): + x = 1 + y = 2 + + z = 3 \ No newline at end of file diff --git a/python/testData/copyPaste/multiLine/IndentInnerFunction1.src.py b/python/testData/copyPaste/multiLine/IndentInnerFunction1.src.py new file mode 100644 index 000000000000..6d09083689a6 --- /dev/null +++ b/python/testData/copyPaste/multiLine/IndentInnerFunction1.src.py @@ -0,0 +1,4 @@ +def foo(self): + x = 1 + y = 2 + diff --git a/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java b/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java index a63554e154a3..b6c67b4903a9 100644 --- a/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java +++ b/python/testSrc/com/jetbrains/python/PyCopyPasteTest.java @@ -147,11 +147,15 @@ public class PyCopyPasteTest extends PyTestCase { doTestMultiLine(); } + public void testIndentInnerFunction1() { //PY-6887 + doTestMultiLine(); + } + public void testIndentFunction() { doTestMultiLine(); } - public void testDecreaseIndent() { + public void testDecreaseIndent() { //PY-6889 doTestMultiLine(); }