PY-18816 Remove failing tests from PyStubsTest since they check not existing functionality

We decided to broaden the scope of PY-18816 so that Python 3-style
function annotations (PEP 3107) are persisted in stub files as well.
Since it requires much more efforts and won't be implemented soon it
doesn't make much sense to keep these tests in the trunk. Dedicated
feature branch contains them anyway.
This commit is contained in:
Mikhail Golubev
2016-07-12 20:27:40 +03:00
parent c93a65d85f
commit 336c99ec2c
@@ -36,7 +36,6 @@ import com.jetbrains.python.psi.impl.PythonLanguageLevelPusher;
import com.jetbrains.python.psi.stubs.PyClassNameIndex;
import com.jetbrains.python.psi.stubs.PyNamedTupleStub;
import com.jetbrains.python.psi.stubs.PyVariableNameIndex;
import com.jetbrains.python.psi.types.PyClassType;
import com.jetbrains.python.psi.types.PyType;
import com.jetbrains.python.psi.types.TypeEvalContext;
import com.jetbrains.python.toolbox.Maybe;
@@ -439,39 +438,6 @@ public class PyStubsTest extends PyTestCase {
assertNotParsed(file);
}
// PY-18741
public void testParameterTypeComment() {
final PyFile file = getTestFile();
final PyFunction func = file.findTopLevelFunction("func");
assertNotNull(func);
final PyParameter[] parameters = func.getParameterList().getParameters();
assertSize(2, parameters);
final PyNamedParameter param = assertInstanceOf(parameters[0], PyNamedParameter.class);
final String annotation = param.getTypeCommentAnnotation();
assertEquals("int", annotation);
assertNotParsed(file);
final TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), file);
final PyType paramType = context.getType(param);
assertInstanceOf(paramType, PyClassType.class);
assertNotParsed(file);
}
public void testTargetExpressionTypeComment() {
final PyFile file = getTestFile();
final PyTargetExpression target = file.findTopLevelAttribute("x");
assertNotNull(target);
final String annotation = target.getTypeCommentAnnotation();
assertEquals("int", annotation);
assertNotParsed(file);
final TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), file);
final PyType paramType = context.getType(target);
assertInstanceOf(paramType, PyClassType.class);
assertNotParsed(file);
}
public void testFullyQualifiedNamedTuple() {
doTestNamedTuple(
QualifiedName.fromDottedString("collections.namedtuple")