Skip to content

Adding other coverage tests#423

Open
robertandremitchell wants to merge 2 commits intomainfrom
rob/coverage-touchups
Open

Adding other coverage tests#423
robertandremitchell wants to merge 2 commits intomainfrom
rob/coverage-touchups

Conversation

@robertandremitchell
Copy link
Copy Markdown
Collaborator

@robertandremitchell robertandremitchell commented Apr 2, 2026

Description

Small touch ups still needed for utils, augmentation. Should get us to 100% coverage in everything but data_curation, which I have not really worked on before, so a little cautious about taking that on: https://app.codecov.io/gh/CDCgov/dibbs-text-to-code/tree/rob%2Fcoverage-touchups/packages

Related Issues

Closes #[Link any related issues or tasks from your project management system.]

Additional Notes

[Add any additional context or notes that reviewers should know about.]

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.74%. Comparing base (cba0d48) to head (19abceb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #423      +/-   ##
==========================================
+ Coverage   95.27%   95.74%   +0.46%     
==========================================
  Files          42       42              
  Lines        2161     2161              
==========================================
+ Hits         2059     2069      +10     
+ Misses        102       92      -10     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Member

@nickclyde nickclyde left a comment

Choose a reason for hiding this comment

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

Good stuff! Just one suggestion below

Comment on lines +174 to +180
"""Tests old document id gets assigningAuthorityName when missing."""
augmenter = EICRAugmenter(BASIC_ECR, [])

parent_doc_id = augmenter._get_old_document_id()

assert parent_doc_id.get("assigningAuthorityName") == "original-document"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The test name says "when missing" but BASIC_ECR already has assigningAuthorityName="original-document" on the <id> element, so this is actually testing the attribute-already-present path. The test at line 146 (test_get_old_document_id_sets_assigning_authority_name_when_missing_attribute) is the one that truly tests the missing case.

Suggested rename: test_get_old_document_id_preserves_assigning_authority_name_when_present.

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.

3 participants