Skip to content

Fixed imprecise assertions - #952

Merged
chrismaddalena merged 1 commit into
masterfrom
hotfix/test-improvements
Jul 28, 2026
Merged

Fixed imprecise assertions#952
chrismaddalena merged 1 commit into
masterfrom
hotfix/test-improvements

Conversation

@chrismaddalena

@chrismaddalena chrismaddalena commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Fixed imprecise assertions in recently adjusted test cases.

Copilot AI review requested due to automatic review settings July 28, 2026 21:03
@augmentcode

augmentcode Bot commented Jul 28, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR improves test precision in the reporting serializer test suite.

Changes:

  • Replaced boolean membership checks like assertTrue("key" in dict) with assertIn for clearer failures
  • Replaced assertTrue(x is not None) with assertIsNotNone for intent-revealing assertions
  • Updated findings key checks to use assertIn

Technical Notes: These changes are test-only and should not affect runtime behavior; they mainly improve assertion semantics and failure messages.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread ghostwriter/reporting/tests/test_serializers.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR tightens unit test assertions in the reporting serializer test suite to use more precise unittest helpers, improving failure messages and intent clarity while keeping behavior unchanged.

Changes:

  • Replaced assertTrue("<key>" in dict) with assertIn(...) for membership checks.
  • Replaced assertTrue(x is not None) with assertIsNotNone(...) for null checks.
  • Updated a nested assertion in findings validation to use assertIn(...).

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.20%. Comparing base (b1498a5) to head (d3f1473).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #952   +/-   ##
=======================================
  Coverage   92.19%   92.20%           
=======================================
  Files         444      444           
  Lines       33957    33957           
=======================================
+ Hits        31308    31309    +1     
+ Misses       2649     2648    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrismaddalena
chrismaddalena merged commit 392e271 into master Jul 28, 2026
10 checks passed
@chrismaddalena
chrismaddalena deleted the hotfix/test-improvements branch July 28, 2026 22:16
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