From f6ce659dbc0756e315afbd7b0176e0410ef183e1 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Fri, 28 Aug 2026 11:11:43 +0800 Subject: [PATCH] test: Capture Python asend behavior --- crates/typos-cli/tests/cmd/false-positives.in/sample.py | 4 ++++ crates/typos-cli/tests/cmd/false-positives.toml | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/typos-cli/tests/cmd/false-positives.in/sample.py b/crates/typos-cli/tests/cmd/false-positives.in/sample.py index 692ff289..e0b8bc82 100644 --- a/crates/typos-cli/tests/cmd/false-positives.in/sample.py +++ b/crates/typos-cli/tests/cmd/false-positives.in/sample.py @@ -3,3 +3,7 @@ import os from numpy.typing import NDArray # should work print(os.O_WRONLY) # should work + + +async def consume(generator): + await generator.asend(None) # should work diff --git a/crates/typos-cli/tests/cmd/false-positives.toml b/crates/typos-cli/tests/cmd/false-positives.toml index 324f41d7..525f82b1 100644 --- a/crates/typos-cli/tests/cmd/false-positives.toml +++ b/crates/typos-cli/tests/cmd/false-positives.toml @@ -1,4 +1,11 @@ bin.name = "typos" stdin = "" -stdout = "" +stdout = """ +error: `asend` should be `ascend` + ╭▸ ./sample.py:9:21 + │ +9 │ await generator.asend(None) # should work + ╰╴ ━━━━━ +""" stderr = "" +status.code = 2