Correct error messages in tests for macros with attrs