mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:21 +00:00
[ty] Tweak some completion tests
These tests were added as a regression check that a panic didn't occur. So we were asserting a bit more than necessary. In particular, these will soon return completions for modules, which creates large snapshots that we don't need. So modify these to just check there is sensible output that doesn't panic.
This commit is contained in:
parent
4db20f459c
commit
05478d5cc7
1 changed files with 15 additions and 3 deletions
|
@ -2262,7 +2262,11 @@ import fo<CURSOR>
|
|||
",
|
||||
);
|
||||
|
||||
assert_snapshot!(test.completions_without_builtins(), @"<No completions found>");
|
||||
// This snapshot would generate a big list of modules,
|
||||
// which is kind of annoying. So just assert that it
|
||||
// runs without panicking and produces some non-empty
|
||||
// output.
|
||||
assert!(!test.completions_without_builtins().is_empty());
|
||||
}
|
||||
|
||||
// Ref: https://github.com/astral-sh/ty/issues/572
|
||||
|
@ -2274,7 +2278,11 @@ import foo as ba<CURSOR>
|
|||
",
|
||||
);
|
||||
|
||||
assert_snapshot!(test.completions_without_builtins(), @"<No completions found>");
|
||||
// This snapshot would generate a big list of modules,
|
||||
// which is kind of annoying. So just assert that it
|
||||
// runs without panicking and produces some non-empty
|
||||
// output.
|
||||
assert!(!test.completions_without_builtins().is_empty());
|
||||
}
|
||||
|
||||
// Ref: https://github.com/astral-sh/ty/issues/572
|
||||
|
@ -2286,7 +2294,11 @@ from fo<CURSOR> import wat
|
|||
",
|
||||
);
|
||||
|
||||
assert_snapshot!(test.completions_without_builtins(), @"<No completions found>");
|
||||
// This snapshot would generate a big list of modules,
|
||||
// which is kind of annoying. So just assert that it
|
||||
// runs without panicking and produces some non-empty
|
||||
// output.
|
||||
assert!(!test.completions_without_builtins().is_empty());
|
||||
}
|
||||
|
||||
// Ref: https://github.com/astral-sh/ty/issues/572
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue