Added a test case where join ifs intention is *not* activated.

This commit is contained in:
Dmitry Cheryasov
2010-12-21 17:20:49 +02:00
parent ca79da6981
commit 4da445e9ae
@@ -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"));
}