PY-15350 Add test case. Problem itself was fixed earlier by usage of PyUtil.deleteElementSafely in refactoring

This commit is contained in:
Mikhail Golubev
2015-03-30 16:46:33 +03:00
parent d4d6d515d5
commit b49e7315b5
5 changed files with 29 additions and 0 deletions
@@ -0,0 +1,8 @@
if True:
pass
while True:
for _ in range(10):
# comment
pass
@@ -0,0 +1,6 @@
def func():
pass
class C:
pass
@@ -0,0 +1,10 @@
if True:
def func():
pass
while True:
for _ in range(10):
# comment
class C:
pass
@@ -349,6 +349,11 @@ public class PyMoveTest extends PyTestCase {
doMoveSymbolTest("VAR", "b.py");
}
// PY-15350
public void testMoveSymbolFromStatementList() {
doMoveSymbolsTest("b.py", "func", "C");
}
private void doMoveFileTest(String fileName, String toDirName) {
Project project = myFixture.getProject();
PsiManager manager = PsiManager.getInstance(project);