mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Test that type for unsupported namedtuple is not calculated from AST
This commit is contained in:
@@ -561,9 +561,15 @@ public class PyStubsTest extends PyTestCase {
|
||||
final PyTargetExpression attribute = file.findTopLevelAttribute("nt");
|
||||
assertNotNull(attribute);
|
||||
|
||||
final TypeEvalContext context = TypeEvalContext.codeInsightFallback(myFixture.getProject());
|
||||
final PyType typeFromStub = TypeEvalContext.codeInsightFallback(myFixture.getProject()).getType(attribute);
|
||||
assertNull(typeFromStub);
|
||||
assertNotParsed(file);
|
||||
|
||||
assertNull(context.getType(attribute));
|
||||
final FileASTNode astNode = file.getNode();
|
||||
assertNotNull(astNode);
|
||||
|
||||
final PyType typeFromAst = TypeEvalContext.userInitiated(myFixture.getProject(), file).getType(attribute);
|
||||
assertNull(typeFromAst);
|
||||
}
|
||||
|
||||
private static void doTestNamedTuple(@NotNull String expectedName,
|
||||
|
||||
Reference in New Issue
Block a user