Improve display of assert_public_ty assertion failures (#13577)

While working on https://github.com/astral-sh/ruff/pull/13576 I noticed
that it was really hard to tell which assertion failed in some of these
test cases. This could be expanded to elsewhere, but I've heard this
test suite format won't be around for long?
This commit is contained in:
Zanie Blue 2024-09-30 16:12:26 -05:00 committed by GitHub
parent c9c748a79e
commit 9d8a4c0057
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2948,7 +2948,11 @@ mod tests {
let file = system_path_to_file(db, file_name).expect("Expected file to exist.");
let ty = global_symbol_ty(db, file, symbol_name);
assert_eq!(ty.display(db).to_string(), expected);
assert_eq!(
ty.display(db).to_string(),
expected,
"Mismatch for symbol '{symbol_name}' in '{file_name}'"
);
}
fn assert_scope_ty(