void (@NotNull String expectedMappingDump, @Nullable PyTypeParameterMapping actualMapping, @NotNull TypeEvalContext context) { if (expectedMappingDump.isEmpty()) { assertNull(actualMapping); } else { assertNotNull("Expected a successful match, got no match", actualMapping); StringBuilder actualMappingDump = new StringBuilder(); for (Couple<PyType> typePair : actualMapping.getMappedTypes()) { actualMappingDump.append(PythonDocumentationProvider.getTypeName(typePair.getFirst(), context)); actualMappingDump.append(" -> "); actualMappingDump.append(PythonDocumentationProvider.getTypeName(typePair.getSecond(), context)); actualMappingDump.append("\n"); } assertSameLines(expectedMappingDump, actualMappingDump.toString()); } }