TST fix string labels in metrics tests

Also found a faulty format op in the error handling.
Merge pull request #1 from larsmans/pr/2170

TST fix string labels in metrics tests