void () { Map<String, PsiElement> marks = loadTest(); final int DST_NUM = 2; Assert.assertEquals(DST_NUM + 3, marks.size()); PsiElement[] dsts = new PsiElement[DST_NUM]; for (int i=0; i<DST_NUM; i+=1) { PsiElement dst = marks.get("<dst" + (i + 1) + ">").getParent(); // ident -> target expr Assert.assertTrue(dst instanceof PyTargetExpression); dsts[i] = dst; } PsiElement[] srcs = new PsiElement[DST_NUM]; for (int i=0; i<DST_NUM; i+=1) { PsiElement src = marks.get("<src" + (i + 1) + ">").getParent().getParent(); // ident -> target expr Assert.assertTrue(src instanceof PyExpression); srcs[i] = src; } PsiElement src = marks.get("<src>").getParent(); // ident -> target expr PyAssignmentStatement stmt = (PyAssignmentStatement)src.getParent().getParent(); List<Pair<PyExpression, PyExpression>> mapping = stmt.getTargetsToValuesMapping(); Assert.assertEquals(DST_NUM, mapping.size()); for (int i=0; i<DST_NUM; i+=1) { Pair<PyExpression, PyExpression> pair = mapping.get(i); Assert.assertEquals(dsts[i], pair.getFirst()); Assert.assertEquals(srcs[i].getText(), pair.getSecond().getText()); } }