TST fix string labels in metrics tests

Also found a faulty format op in the error handling.