diff --git a/python/testSrc/com/jetbrains/python/PyIntentionTest.java b/python/testSrc/com/jetbrains/python/PyIntentionTest.java
index 5799c1ffb6f1..92b0e2659fd7 100644
--- a/python/testSrc/com/jetbrains/python/PyIntentionTest.java
+++ b/python/testSrc/com/jetbrains/python/PyIntentionTest.java
@@ -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 is not active.
+ * @param hint
+ */
+ private void doNegativeTest(String hint) {
+ myFixture.configureByFile("intentions/before" + getTestName(false) + ".py");
+ List 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"));
}