mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 12:17:12 +07:00
PY-10184 Impl hasattr support
GitOrigin-RevId: e5826372ddfe233656097da774d978c57ee54937
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fbb4219246
commit
d66e0eec0e
@@ -1465,4 +1465,18 @@ public abstract class PyCommonResolveTest extends PyCommonResolveTestCase {
|
||||
final TypeEvalContext context = TypeEvalContext.codeInsightFallback(myFixture.getProject());
|
||||
assertEmpty(file.findTopLevelAttribute("t").multiResolveAssignedValue(PyResolveContext.noImplicits().withTypeEvalContext(context)));
|
||||
}
|
||||
|
||||
// PY-10184
|
||||
public void testHasattrResolveTrueIfBranch() {
|
||||
PsiElement targetElement = resolve();
|
||||
assertInstanceOf(targetElement, PyStringLiteralExpression.class);
|
||||
assertEquals("ajjj", ((PyStringLiteralExpression)targetElement).getStringValue());
|
||||
}
|
||||
|
||||
// PY-10184
|
||||
public void testHasattrResolveConditionalExpression() {
|
||||
PsiElement targetElement = resolve();
|
||||
assertInstanceOf(targetElement, PyStringLiteralExpression.class);
|
||||
assertEquals("fld", ((PyStringLiteralExpression)targetElement).getStringValue());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user