-
Notifications
You must be signed in to change notification settings - Fork 2
revert: undo external PRs #34 and #35 for quality review #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -249,7 +249,7 @@ def detect_test_info(target: Path) -> dict[str, Any]: | |
| content = test_file.read_text(errors="replace") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM: Async test detection reverted-potential test undercountConfidence: 90% The regular expression for counting test functions in Suggestion: If async test functions should be counted, reinstate the previous regex: — Reverting this means async test functions are no longer counted. If that's intentional, make sure everyone agrees. If not, expect confusion later. |
||
| except (PermissionError, OSError): | ||
| continue | ||
| count += len(re.findall(r"^\s*(?:async\s+)?def test_", content, re.MULTILINE)) | ||
| count += len(re.findall(r"^\s*def test_", content, re.MULTILINE)) | ||
|
|
||
| return { | ||
| "test_framework": "pytest", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -449,14 +449,6 @@ def test_ignores_non_test_files(self, tmp_path: Path) -> None: | |
| result = detect_test_info(tmp_path) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔵 LOW: Async test detection test removedConfidence: 95% The test case for detecting async test functions was removed. With the regex reverted to match only sync tests, async test coverage detection is no longer tested. This reduces confidence that the test counting function will be accurate if async test support is reintroduced. Suggestion: If async test support is removed intentionally, consider documenting the decision and, if possible, revisiting the need for such tests before merging future related changes. — The coverage for async test detection goes with the code. Makes sense, but if async detection returns, so should its test. |
||
| assert result["test_count"] == 1 | ||
|
|
||
| def test_detects_async_test_functions(self, tmp_path: Path) -> None: | ||
| tests = tmp_path / "tests" | ||
| tests.mkdir() | ||
| test_file = tests / "test_example.py" | ||
| test_file.write_text("def test_sync(): pass\nasync def test_async(): pass\n") | ||
| result = detect_test_info(tmp_path) | ||
| assert result["test_count"] == 2 | ||
|
|
||
|
|
||
| # --------------------------------------------------------------------------- | ||
| # TestInspectProject | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 LOW: Loss of CLI help text
Confidence: 98%
Several
helpparameter strings from click options were removed as part of this revert. This reduces CLI discoverability and user experience for newcomers or users unfamiliar with argument usage.Suggestion: When reintroducing these features, preserve detailed help text for all CLI options where possible. Consider adding a governance rule requiring help text on CLI arguments.
— It's a revert, so not a bug-but the CLI's self-documentation takes a hit. Just make sure these help texts come back.