void (@NotNull String expectedTypeList, @NotNull String functionParameterList, @NotNull String expectedMapping) { String testData = generateTypingDeclarations(expectedTypeList, functionParameterList) + "expected: tuple[Sentinel, " + expectedTypeList + "] = ...\n" + "def actual(" + functionParameterList + "): ...\n"; TypeEvalContext context = TypeEvalContext.codeAnalysis(myFixture.getProject(), myFixture.getFile()); myFixture.configureByText("a.py", testData); PyTargetExpression expectedTuple = myFixture.findElementByText("expected", PyTargetExpression.class); PyTupleType expectedTupleType = assertInstanceOf(context.getType(expectedTuple), PyTupleType.class); PyFunction actualFunction = myFixture.findElementByText("actual", PyFunction.class); PyFunctionType actualFunctionType = assertInstanceOf(context.getType(actualFunction), PyFunctionType.class); PyTypeParameterMapping mapping = PyTypeParameterMapping.mapWithParameterList(ContainerUtil.subList(expectedTupleType.getElementTypes(), 1), actualFunctionType.getParameters(context), context); assertTypeMapping(expectedMapping, mapping, context); }