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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user