Improve error messages of documentation tests