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