Repository navigation
fix: discover async test functions - #101
Conversation
Include async function definitions when listing existing Python tests. Cover sync and async functions, decorators, class methods, and helper exclusion through the CLI output. Signed-off-by: Ben Kapner <benkapner@gmail.com>
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand |
PR Summary by QodoDiscover async test functions in test listings
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
|
🤖 Finished Review · ❌ Failure (fullsend config could not be loaded, agent did not run: loading fullsend config: config.yaml: create_issues is no longer supported: move create_issues.allow_targets to tracker.<provider>.allowed_ta…) · Started 3:30 PM UTC · Completed 3:30 PM UTC Commit: |
|
🤖 Finished Review · ❌ Failure (fullsend config could not be loaded, agent did not run: loading fullsend config: config.yaml: create_issues is no longer supported: move create_issues.allow_targets to tracker.<provider>.allowed_ta…) · Started 8:59 AM UTC · Completed 8:59 AM UTC Commit: |
|
🤖 Finished Review · ✅ Success · Started 12:41 PM UTC · Completed 12:47 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.90 |
|
Risk Assessment: low (1/5) DetailsSmall 47-line bug fix across 3 files with accompanying tests and zero recent git churn, keeping overall risk low despite touching a protected scripts path. Previous runRisk Assessment: low (1/5) DetailsSmall 47-line bug fix across 3 files with accompanying tests and zero recent git churn, keeping overall risk low despite touching a protected scripts path. |
ReviewFindingsHigh
Low
Next steps:
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W119 --> ReviewFindingsHigh
Labels: The PR is a bug fix to test-function discovery. Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 9:06 AM UTC · Completed 9:13 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.18 |
Summary
list_test_functions.pyonly recognizesast.FunctionDef, so existingasync def test_*functions are missing from its output. The test-generation skill uses that output to detect already-implemented tests, so async cases can be generated again.This PR includes
ast.AsyncFunctionDefin the existing AST filter.Related Issue
None - opened directly as a bug fix.
Changes
scripts/list_test_functions.py: recognize synchronous and asynchronous test definitions.tests/consts/discovery_constants.py: add a mixed Python source fixture following the shared test-data convention.tests/unit/test_list_test_functions.py: exercise the CLI and assert the complete JSON output, including names, line numbers, docstrings, and ordering.Testing
uv run --extra dev pre-commit run --all-filespassesmake lintpassesuv run pytest tests/ -q --cov=scripts --cov-report=term-missing --cov-fail-under=70passes on Python 3.14: 1,569 passed, 2 skipped, with 85.30% coverage.The new regression test fails against the previous implementation, which returns only the synchronous test. It covers:
make lintreports one existing configuration warning: the installed skillsaw version no longer recognizescontent-critical-position.Checklist