mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Update PyArgumentListInspectionTest: specify issue before method to overcome hiding after folding, use runWithLanguageLevel
This commit is contained in:
@@ -17,7 +17,6 @@ package com.jetbrains.python.inspections;
|
||||
|
||||
import com.jetbrains.python.fixtures.PyTestCase;
|
||||
import com.jetbrains.python.psi.LanguageLevel;
|
||||
import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
|
||||
|
||||
/**
|
||||
* @author yole
|
||||
@@ -36,13 +35,7 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testDecoratorsPy3K() {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), LanguageLevel.PYTHON30);
|
||||
try {
|
||||
doTest();
|
||||
}
|
||||
finally {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), null);
|
||||
}
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON30, this::doTest);
|
||||
}
|
||||
|
||||
// PY-19130
|
||||
@@ -58,12 +51,14 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
public void testTupleVsLiteralList() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testInheritedInit() { // PY-312
|
||||
|
||||
// PY-312
|
||||
public void testInheritedInit() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testBadDecorator() { // PY-428
|
||||
|
||||
// PY-428
|
||||
public void testBadDecorator() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -84,13 +79,7 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testPy1268() {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), LanguageLevel.PYTHON30);
|
||||
try {
|
||||
doTest();
|
||||
}
|
||||
finally {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), null);
|
||||
}
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON30, this::doTest);
|
||||
}
|
||||
|
||||
public void testInstanceMethodAsLambda() {
|
||||
@@ -106,15 +95,18 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testTuples() { // PY-2294
|
||||
// PY-2294
|
||||
public void testTuples() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNestedClass() { // PY-2460
|
||||
// PY-2460
|
||||
public void testNestedClass() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testReassignedMethod() { // PY-2622
|
||||
// PY-2622
|
||||
public void testReassignedMethod() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -122,15 +114,18 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testFunctionStoredInInstance() { // PY-3623
|
||||
// PY-3623
|
||||
public void testFunctionStoredInInstance() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testUnresolvedSuperclass() { // PY-4419
|
||||
|
||||
// PY-4419
|
||||
public void testUnresolvedSuperclass() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testMultipleInheritedConstructors() { // PY-4897
|
||||
|
||||
// PY-4897
|
||||
public void testMultipleInheritedConstructors() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@@ -154,13 +149,7 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
}
|
||||
|
||||
public void testPy3k() {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), LanguageLevel.PYTHON30);
|
||||
try {
|
||||
doTest();
|
||||
}
|
||||
finally {
|
||||
PythonLanguageLevelPusher.setForcedLanguageLevel(myFixture.getProject(), null);
|
||||
}
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON30, this::doTest);
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
@@ -194,11 +183,13 @@ public class PyArgumentListInspectionTest extends PyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testParameterWithDefaultAfterKeywordContainer() { // PY-9934
|
||||
// PY-9934
|
||||
public void testParameterWithDefaultAfterKeywordContainer() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testParameterWithDefaultAfterKeywordContainer2() { // PY-10351
|
||||
// PY-10351
|
||||
public void testParameterWithDefaultAfterKeywordContainer2() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user