fix: detect async def test_ functions in project inspector#42
Open
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Open
fix: detect async def test_ functions in project inspector#42Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Nelson Spence (Fieldnote-Echo) wants to merge 1 commit intomainfrom
Conversation
The regex only matched synchronous `def test_*` functions, missing `async def test_*` functions used with pytest-asyncio. Fixes #32 Co-Authored-By: RogueTex <RogueTex@users.noreply.github.com>
11 tasks
Copilot started reviewing on behalf of
Nelson Spence (Fieldnote-Echo)
March 12, 2026 04:18
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes test function counting in the project inspector by updating detect_test_info to recognize async def test_* functions (e.g., pytest-asyncio), and adds regression coverage for the async case.
Changes:
- Update test-function detection regex to match both
def test_andasync def test_. - Add a unit test ensuring async test functions are included in the detected
test_count.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/navi_bootstrap/init.py |
Expands the regex used by detect_test_info to include async test functions. |
tests/test_init.py |
Adds coverage to ensure async test functions are counted. |
Contributor
✅ Grippy Review — PASSScore: 100/100 | Findings: 0 Commit: afa8d82 |
project-navi-bot
approved these changes
Mar 12, 2026
Collaborator
project-navi-bot
left a comment
There was a problem hiding this comment.
All required CI checks passed. Auto-approved by navi-bot.
project-navi-bot
approved these changes
Mar 12, 2026
Collaborator
project-navi-bot
left a comment
There was a problem hiding this comment.
All required CI checks passed. Auto-approved by navi-bot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The regex in
detect_test_infoonly matched synchronousdef test_*functions,missing
async def test_*functions used with pytest-asyncio.Updates the regex to use
(?:async\s+)?and adds a test covering the async case.Fixes #32
Recreated from #34 by Raghu :) (@RogueTex) — original was reverted during CI infrastructure work. See comment below for context.
Co-Authored-By: RogueTex RogueTex@users.noreply.github.com