use of com.intellij.codeInsight.intention.IntentionAction in project intellij-community by JetBrains.
the class PyUnresolvedReferencesInspectionTest method testIgnoredUnresolvedReferenceInUnionType.
// PY-11956
public void testIgnoredUnresolvedReferenceInUnionType() {
final String testName = getTestName(true);
final String inspectionName = getInspectionClass().getSimpleName();
myFixture.configureByFile("inspections/" + inspectionName + "/" + testName + ".py");
myFixture.enableInspections(getInspectionClass());
final String attrQualifiedName = "inspections." + inspectionName + "." + testName + ".A.foo";
final IntentionAction intentionAction = myFixture.findSingleIntention("Ignore unresolved reference '" + attrQualifiedName + "'");
assertNotNull(intentionAction);
myFixture.launchAction(intentionAction);
myFixture.checkHighlighting(isWarning(), isInfo(), isWeakWarning());
}
use of com.intellij.codeInsight.intention.IntentionAction in project intellij-community by JetBrains.
the class PyIntentionTest method doTest.
private void doTest(String hint, boolean ignoreWhiteSpaces) {
myFixture.configureByFile("intentions/" + getTestName(true) + ".py");
final IntentionAction action = myFixture.findSingleIntention(hint);
myFixture.launchAction(action);
myFixture.checkResultByFile("intentions/" + getTestName(true) + "_after.py", ignoreWhiteSpaces);
}
use of com.intellij.codeInsight.intention.IntentionAction in project intellij-community by JetBrains.
the class PyIntentionTest method doTest.
private void doTest(String hint) {
myFixture.configureByFile("intentions/" + getTestName(true) + ".py");
final IntentionAction action = myFixture.findSingleIntention(hint);
myFixture.launchAction(action);
myFixture.checkResultByFile("intentions/" + getTestName(true) + "_after.py");
}
use of com.intellij.codeInsight.intention.IntentionAction in project intellij-community by JetBrains.
the class PyIntentionTestCase method doIntentionTest.
protected void doIntentionTest(final String hint, String... files) {
final String testFileName = getTestName(true);
if (files.length > 0) {
myFixture.configureByFiles(files);
} else {
myFixture.configureByFile(testFileName + ".py");
}
final IntentionAction intentionAction = myFixture.findSingleIntention(hint);
assertNotNull(intentionAction);
myFixture.launchAction(intentionAction);
myFixture.checkResultByFile(testFileName + "_after.py", true);
}
use of com.intellij.codeInsight.intention.IntentionAction in project intellij-community by JetBrains.
the class PyIntentionTestCase method doNegativeTest.
protected void doNegativeTest(final String hint) {
final String testFileName = getTestName(true);
myFixture.configureByFile(testFileName + ".py");
final IntentionAction intentionAction = myFixture.getAvailableIntention(hint);
assertNull(intentionAction);
}
Aggregations