Skip to content

Test Coverage Improvements (>95%) & CI Coverage Fix - #9

Merged
Khubaib8281 merged 3 commits into
Inference-LAB:mainfrom
Ayesha-Anwar607:test/test-coverage
Jul 30, 2026
Merged

Khubaib8281 merged 3 commits into
Inference-LAB:mainfrom
Ayesha-Anwar607:test/test-coverage

Conversation

@Ayesha-Anwar607

Copy link
Copy Markdown
Collaborator

What was changed?

  1. Fixed 0% Coverage Reporting in CI Workflow (.github/workflows/ci.yml):

    • Updated dependency installation to run pip install -e . (editable mode) and set PYTHONPATH=..
    • Previously, coverage.py was checking local files while tests executed against installed site-packages, resulting in an artificial 0% report. Coverage reporting in CI now correctly tracks the source files.
  2. Added New Unit Tests (tests/):

    • tests/test_provider_methods.py: Added coverage for all FakerPKProvider methods when generating multiple outputs (count > 1) and added error handling assertions for invalid inputs (e.g. pytest.raises(ValueError) for invalid industry names).
    • tests/test_student_profile_gender_cnic_alignment.py: Verified CNIC gender digit alignment (odd for male, even for female).
    • tests/test_student_profile_multiple_count.py: Validated list generation structure for student profiles.

Results

  • All Tests Passing: 42/42 tests passing.
  • Code Coverage: Increased total code coverage from 86% to >95% (exceeding the required >90% threshold).

@Khubaib8281 Kindly Review this PR whenever you have time.

@Khubaib8281
Khubaib8281 self-requested a review July 30, 2026 08:36

@Khubaib8281 Khubaib8281 left a comment

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.

Great addition. The implementation is clear, and the accompanying tests provide good confidence. LGTM

@Khubaib8281
Khubaib8281 merged commit 0119278 into Inference-LAB:main Jul 30, 2026
5 checks passed
@Ayesha-Anwar607
Ayesha-Anwar607 deleted the test/test-coverage branch July 30, 2026 08:50
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