void (@NotNull String expectedTypeList, @NotNull String actualTypeList, @NotNull String expectedMapping, PyTypeParameterMapping.Option @NotNull ... options) { String testData = generateTypingDeclarations(expectedTypeList, actualTypeList) + // Add an artificial first type to handle empty parameter list cases "expected: tuple[Sentinel, " + expectedTypeList + "] = ...\n" + "actual: tuple[Sentinel, " + actualTypeList + "] = ...\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); PyTargetExpression actualTuple = myFixture.findElementByText("actual", PyTargetExpression.class); PyTupleType actualTupleType = assertInstanceOf(context.getType(actualTuple), PyTupleType.class); PyTypeParameterMapping mapping = PyTypeParameterMapping.mapByShape(ContainerUtil.subList(expectedTupleType.getElementTypes(), 1), ContainerUtil.subList(actualTupleType.getElementTypes(), 1), options); assertTypeMapping(expectedMapping, mapping, context); }