Fix error output in tests.