mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 08:04:26 -05:00
[ty] Fix benchmark assertion (#22003)
This commit is contained in:
@@ -376,6 +376,10 @@ class IncrementalEditTest(LspTest):
|
||||
"The after edit diagnostics should be initialized if the test ran at least once. Did you forget to call `run`?"
|
||||
)
|
||||
|
||||
new_diagnostics = diff_diagnostics(
|
||||
self.before_edit_diagnostics, self.after_edit_diagnostics
|
||||
)
|
||||
|
||||
before_edit_count = sum(
|
||||
len(diagnostics) for _, diagnostics in self.before_edit_diagnostics
|
||||
)
|
||||
@@ -384,7 +388,7 @@ class IncrementalEditTest(LspTest):
|
||||
len(diagnostics) for _, diagnostics in self.after_edit_diagnostics
|
||||
)
|
||||
|
||||
assert after_edit_count > before_edit_count, (
|
||||
assert len(new_diagnostics) > 0, (
|
||||
f"Expected more diagnostics after the change. "
|
||||
f"Initial: {before_edit_count}, After change: {after_edit_count}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user