void () { PyExpression expr = parseExpr(""" from collections import namedtuple class MyClass(namedtuple('T', 'a b c')): def get_foo(self): return self.a inst = MyClass(1,2,3) expr = inst._replace(a=2) """); doTest("MyClass", expr, TypeEvalContext.userInitiated(expr.getProject(), expr.getContainingFile())); }