mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-16412 Don't suggest the intention for targets that doesn't allow annotations
This commit is contained in:
committed by
Andrey Vlasovskikh
parent
95227c365b
commit
fc3d1b7beb
+33
@@ -9,6 +9,35 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author Mikhail Golubev
|
||||
*/
|
||||
public class PyAnnotateVariableTypeIntentionTest extends PyIntentionTestCase {
|
||||
|
||||
public void testNotSuggestedForLocalAssignmentTargetWithAnnotation() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForLocalAssignmentTargetWithAheadOfTimeAnnotation() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForLocalAssignmentTargetWithTypeComment() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForComprehensionTarget() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForImportTarget() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForGlobalTarget() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testNotSuggestedForNonlocalTarget() {
|
||||
doNegativeTest();
|
||||
}
|
||||
|
||||
public void testAnnotationLocalSimpleAssignmentTarget() {
|
||||
doTestAnnotation();
|
||||
}
|
||||
@@ -68,4 +97,8 @@ public class PyAnnotateVariableTypeIntentionTest extends PyIntentionTestCase {
|
||||
private void doTest(@NotNull LanguageLevel languageLevel) {
|
||||
doTest(PyBundle.message("INTN.annotate.types"), languageLevel);
|
||||
}
|
||||
|
||||
private void doNegativeTest() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON36, () -> doNegativeTest(PyBundle.message("INTN.annotate.types")));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user