mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-21292 Properly delete obsolete imports of moved symbols
Some of them might have been left if the corresponding symbols were used and imported via "from" imports in the same module or new imports of them were combined with some exiting "from" imports in a dependent module.
This commit is contained in:
@@ -361,6 +361,16 @@ public class PyMoveTest extends PyTestCase {
|
||||
doMoveSymbolTest("func", "b.py");
|
||||
}
|
||||
|
||||
// PY-21292
|
||||
public void testStaleFromImportsRemovedWhenSeveralMovedSymbolsUsedInSameModule() {
|
||||
doMoveSymbolsTest("b.py", "A", "B");
|
||||
}
|
||||
|
||||
// PY-21292
|
||||
public void testStaleFromImportRemovedWhenNewImportCombinedWithExistingImport() {
|
||||
doMoveSymbolTest("A", "b.py");
|
||||
}
|
||||
|
||||
private void doMoveFileTest(String fileName, String toDirName) {
|
||||
Project project = myFixture.getProject();
|
||||
PsiManager manager = PsiManager.getInstance(project);
|
||||
|
||||
Reference in New Issue
Block a user