Skip to content

test: add comprehensive tests for new modules - #11

Merged
rishitank merged 1 commit into
mainfrom
feature/add-tests-and-mcp-integration
Feb 6, 2026
Merged

rishitank merged 1 commit into
mainfrom
feature/add-tests-and-mcp-integration

Conversation

@rishitank

Copy link
Copy Markdown
Owner

Summary

Add comprehensive tests for all 9 new modules that were created to improve AnimaWatch's debugging capabilities.

New Test Files (99 tests)

File Tests Coverage
test_models.py 9 Severity, IssueCategory, BoundingBox, Finding, AnalysisResult, AnalysisMetadata
test_cache.py 11 Async get/set, TTL expiration, max size eviction, hash_file
test_devices.py 16 DeviceProfile, DEVICES dict, get_device(), list_devices()
test_diff.py 8 compare_images(), DiffRegion, batch comparison
test_fps.py 7 FPSAnalysisResult, JankEvent, generate_fps_report()
test_frames.py 5 ExtractedFrame, FrameExtractionResult, cleanup
test_consensus.py 12 ConsensusResult, _findings_similar(), _max_severity()
test_grounding.py 13 GroundedFinding, VerificationResult, parse_bounding_box()
test_metrics.py 12 CoreWebVitals, rate_metric(), generate_metrics_report()

Test Results

======================= 149 passed, 11 warnings in 1.18s =======================

Checklist

  • All 149 tests pass
  • Lint (ruff) passes
  • Type check (mypy) passes
  • Format (ruff format) applied

Pull Request opened by Augment Code with guidance from the PR author

Add tests for all 9 new modules:
- test_models.py: Pydantic models (Severity, IssueCategory, Finding, AnalysisResult)
- test_cache.py: Async cache with TTL, eviction, hash_file
- test_devices.py: Device profiles and emulation
- test_diff.py: Visual diff comparison
- test_fps.py: FPS analysis and jank detection
- test_frames.py: Frame extraction
- test_consensus.py: Multi-model consensus
- test_grounding.py: Hallucination prevention and verification
- test_metrics.py: Core Web Vitals and performance metrics

Total: 99 new tests (149 total including existing)
@rishitank
rishitank enabled auto-merge (squash) February 6, 2026 17:17
@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@rishitank has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-tests-and-mcp-integration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rishitank
rishitank merged commit 0367c7d into main Feb 6, 2026
8 checks passed
@rishitank
rishitank deleted the feature/add-tests-and-mcp-integration branch February 6, 2026 17:17
@rishitank rishitank mentioned this pull request Feb 6, 2026
Comment thread tests/test_metrics.py
)
report = generate_metrics_report(metrics)
assert "Performance Metrics Report" in report
assert "https://test.com" in report

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High test

The string
https://test.com
may be at an arbitrary position in the sanitized URL.

Copilot Autofix

AI 8 months ago

Copilot could not generate an autofix suggestion

Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants