void () { runWithLanguageLevel( LanguageLevel.PYTHON36, () -> { final PyExpression definition = parseExpr(""" from typing import NamedTuple User = NamedTuple("User", name=str, level=int) expr = User"""); for (TypeEvalContext context : getTypeEvalContexts(definition)) { assertInstanceOf(context.getType(definition), PyNamedTupleType.class); } final PyExpression instance = parseExpr(""" from typing import NamedTuple User = NamedTuple("User", name=str, level=int) expr = User("name")"""); for (TypeEvalContext context : getTypeEvalContexts(instance)) { assertInstanceOf(context.getType(instance), PyNamedTupleType.class); } } ); }