mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Added a test case where join ifs intention is *not* activated.
This commit is contained in:
@@ -5,6 +5,8 @@ import com.jetbrains.python.fixtures.PyLightFixtureTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Alexey.Ivanov
|
||||
*/
|
||||
@@ -27,6 +29,16 @@ public class PyIntentionTest extends PyLightFixtureTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that intention with given hint <i>is not</i> active.
|
||||
* @param hint
|
||||
*/
|
||||
private void doNegativeTest(String hint) {
|
||||
myFixture.configureByFile("intentions/before" + getTestName(false) + ".py");
|
||||
List<IntentionAction> ints = myFixture.filterAvailableIntentions(hint);
|
||||
assertEmpty(ints);
|
||||
}
|
||||
|
||||
public void testConvertDictComp() {
|
||||
doTest(PyBundle.message("INTN.convert.dict.comp.to"));
|
||||
}
|
||||
@@ -113,6 +125,10 @@ public class PyIntentionTest extends PyLightFixtureTestCase {
|
||||
doTest(PyBundle.message("INTN.join.if.text"));
|
||||
}
|
||||
|
||||
public void testJoinIfElse() {
|
||||
doNegativeTest(PyBundle.message("INTN.join.if.text"));
|
||||
}
|
||||
|
||||
public void testDictConstructorToLiteralForm() {
|
||||
doTest(PyBundle.message("INTN.convert.dict.constructor.to.dict.literal"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user