mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
package com.jetbrains.python;
|
||||
|
||||
import com.intellij.codeInsight.editorActions.SelectWordHandler;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
@@ -36,27 +32,6 @@ public class PySelectWordTest extends PyTestCase {
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
@NonNls final String path = "selectWord/" + getTestName(true);
|
||||
myFixture.copyDirectoryToProject(path, path);
|
||||
myFixture.configureByFile(path + "/before.py");
|
||||
int i = 1;
|
||||
while (true) {
|
||||
@NonNls String resultPath = path + "/after" + i + ".py";
|
||||
if (new File(getTestDataPath() + "/" + resultPath).exists()) {
|
||||
performAction();
|
||||
//System.out.println("comparing with "+resultPath);
|
||||
myFixture.checkResultByFile(resultPath, false);
|
||||
i++;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
assertTrue(i > 1);
|
||||
}
|
||||
|
||||
private void performAction() {
|
||||
SelectWordHandler action = new SelectWordHandler(null);
|
||||
action.execute(myFixture.getEditor(), DataManager.getInstance().getDataContext());
|
||||
CodeInsightTestUtil.doWordSelectionTestOnDirectory(myFixture, "selectWord/" + getTestName(true), "py");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.io.File;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
@TestDataPath("$CONTENT_ROOT/../testData/")
|
||||
@TestDataPath("$CONTENT_ROOT/../../testData/")
|
||||
public abstract class PyTestCase extends UsefulTestCase {
|
||||
public static String PYTHON_2_MOCK_SDK = "2.7";
|
||||
public static String PYTHON_3_MOCK_SDK = "3.2";
|
||||
|
||||
Reference in New Issue
Block a user