Fix: Moved pwhtool tests into tests dir @hruico#847
Fix: Moved pwhtool tests into tests dir @hruico#847VaibhavUpreti merged 3 commits intoTracer-Cloud:mainfrom
Conversation
Greptile SummaryThis PR consolidates Confidence Score: 5/5Safe to merge — the migration is correct, no tests are lost, and the only finding is duplicate test cases (P2). All findings are P2 style issues. The test logic itself is correct, no functionality is changed, and the old file is cleanly deleted. Duplicate tests are a minor maintenance concern but do not affect correctness or CI reliability. tests/tools/test_prefect_worker_health_tool.py — three redundant test functions should be removed. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[tool_test.py\nDeleted] -->|tests migrated| B[test_prefect_worker_health_tool.py]
B --> C[Pre-existing tests\nfrom original file]
B --> D[New tests\nfrom tool_test.py]
C --> E[test_is_available_requires_connection_verified]
C --> F[test_extract_params_maps_fields]
C --> G[test_run_returns_unavailable_when_no_api_url]
D --> H[test_is_available_when_connection_verified\n⚠️ overlaps E]
D --> I[test_is_available_false_without_connection_verified\n⚠️ overlaps E]
D --> J[test_run_returns_unavailable_without_api_url\n⚠️ overlaps G]
D --> K[New unique tests\nbatch/worker/metadata/etc.]
Reviews (1): Last reviewed commit: "improvement using pytest fixture" | Re-trigger Greptile |
|
Hey @hruico, I walked through the diff and the migration itself looks good: the old There are a few redundant tests left in the consolidated file though:
These older tests are now strictly less expressive than the new ones and just add noise. I suggest deleting:
This matches the earlier Greptile note about duplicate coverage. After that small cleanup, we can rely on CI and merge 👍 |
| {"name": "worker-3", "status": "UNHEALTHY", "last_heartbeat_time": "2026-04-05T09:00:00Z"}, | ||
| ] | ||
| mock_client = MagicMock() | ||
| mock_client.__enter__ = MagicMock(return_value=mock_client) |
VaibhavUpreti
left a comment
There was a problem hiding this comment.
awesome, thanks for contributing @hruico , merging this for velocity. I'll fix the reviews on main
Fixes #842
Describe the changes you have made in this PR -
Screenshots of the UI changes (If any) -
Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
Checklist before requesting a review