From 336c99ec2c0550ea4a188ce5761b62ee11408796 Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Tue, 12 Jul 2016 20:24:07 +0300 Subject: [PATCH] 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. --- .../com/jetbrains/python/PyStubsTest.java | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/python/testSrc/com/jetbrains/python/PyStubsTest.java b/python/testSrc/com/jetbrains/python/PyStubsTest.java index 8c2cedbb3451..60eaac935e80 100644 --- a/python/testSrc/com/jetbrains/python/PyStubsTest.java +++ b/python/testSrc/com/jetbrains/python/PyStubsTest.java @@ -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")