void () { final PsiElement resolved = resolve(); assertInstanceOf(resolved, PyTargetExpression.class); final PyTargetExpression target = (PyTargetExpression)resolved; assertEquals("foo", target.getName()); final ScopeOwner owner = ScopeUtil.getScopeOwner(target); assertNotNull(owner); assertInstanceOf(owner, PyFunction.class); assertEquals("__new__", owner.getName()); }