test: add unit tests for scoring module#74
Open
beonde wants to merge 2 commits into
Open
Conversation
…ailability) 56 new tests covering: - types.py: rating boundary values, confidence multiplier, dataclass validation - compliance.py: perfect score, core fields, skills quality, format, data quality - trust.py: signatures, provider, security, documentation, multiplier application - availability.py: not-tested, primary endpoint, transport, response quality All tests are pure unit tests with no network or server dependencies.
|
✅ Documentation validation passed!
|
|
✅ All checks passed! Ready for review. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds a dedicated unit test suite for the capiscio_sdk.scoring subsystem, improving confidence in the SDK’s multi-dimensional scoring behavior without requiring any network or gRPC dependencies.
Changes:
- Added rating/helper and dataclass validation tests for
capiscio_sdk.scoring.types. - Added unit tests for
ComplianceScorer,TrustScorer, andAvailabilityScorer, including domain-specific issue filtering.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/unit/test_scoring_types.py |
Verifies rating boundary helpers, confidence multiplier logic, and dataclass __post_init__ validation. |
tests/unit/test_scoring_compliance.py |
Exercises ComplianceScorer scoring components and compliance-only issue filtering. |
tests/unit/test_scoring_trust.py |
Exercises TrustScorer scoring components, multiplier behavior, and trust-only issue filtering. |
tests/unit/test_scoring_availability.py |
Exercises AvailabilityScorer endpoint scoring and availability-only issue filtering. |
Comment on lines
+3
to
+4
| import pytest | ||
|
|
Comment on lines
+3
to
+4
| import pytest | ||
|
|
Address review: remove unused 'import pytest' from test_scoring_trust.py and test_scoring_availability.py.
|
✅ Documentation validation passed!
|
|
✅ All checks passed! Ready for review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive unit tests for the scoring module (
capiscio_sdk/scoring/). Previously there were zero dedicated unit tests for the scoring subsystem — only integration tests that required a running gRPC server.Test Files
test_scoring_types.pyscoring/types.pytest_scoring_compliance.pyscoring/compliance.pytest_scoring_trust.pyscoring/trust.pytest_scoring_availability.pyscoring/availability.pyKey Properties