Why do you need a balanced test set? It seems to be the consensus that, if possible, both train and test set for binary classification should be balanced over the two classes, especially if using classifiers like SVM. 
Whilst I understand why that's the case in the train set, why does the test set need to be balanced? My understanding is that each sample would be a separate problem and predicted on its own, so why would the overall distribution impact the prediction?

Practical context: I am working on a biological problem for which I have access to positives and can "make up" negatives for my classifier, and so I can achieve a perfectly balanced train set. However, the practical real-life application would be on sets that contain overwhelmingly more negatives than positives because of the nature of the problem.
 A: When you calculate the test error, you may want to know how your model works for each class. As an extreme, if you have only the positive class in your test set, your test error would be imperfect as you don't know how your classifier would work with the negative class. Even though you calculated the train set error of both classes, it may not represent the test set error properly as test error is usually worse than the train set error. 
On the question of representing the real-life error, it depends on how you want to calculate the error. For the FPR, TPR, they don't depend on the ratio of the observation's numbers in classes and so we don't have a problem. And ROC which constructed from FPR and TPR has no problem either.
But there are some quantities such as FDR which depends on the class ratio. So you may need to take caution if you need to calculate those quantities.
I attach a figure showing the quantities calculated for binary classification. 
(https://en.wikipedia.org/wiki/Receiver_operating_characteristic) In addition to the FDR, the quantities on the rows such as PPV, FOR, NPV depend on the class ratio and you will not get the real-life quantities.

In addition, 0-1 loss is also affected by the class balancing: 
$$
L(i, j) =
\begin{cases}
0 \qquad i = j \\
1 \qquad i \ne j
\end{cases}
\qquad i,j \in M
$$
In the above table, 0-1 loss is the same as FP + FN, and the quantity changes when we change the class balance.
