Skip to content

refactor: improve data sanity test assertions and duplicate reporting - #2819

Open
Tamil-Selvan12 wants to merge 1 commit into
DeepSourceCorp:masterfrom
Tamil-Selvan12:fix-2273
Open

Tamil-Selvan12 wants to merge 1 commit into
DeepSourceCorp:masterfrom
Tamil-Selvan12:fix-2273

Conversation

@Tamil-Selvan12

Copy link
Copy Markdown

This PR addresses Issue #2273 by improving the data sanity tests in gfi/test_data.py.

Changes made:

Replaced bare assert statements with proper unittest assertions.
Removed unnecessary @staticmethod decorators from test methods.
Removed the unnecessary print() statement from the duplicate repository test.
Added clear error messages for missing data and labels files.
Improved duplicate repository reporting by showing the duplicated repository names when the test fails.

These changes improve the readability and maintainability of the test code and provide more useful information when a test fails, while preserving the existing test behavior.

Testing performed:

uv run python gfi/test_data.py — 5 tests passed.
uv run mypy gfi — no issues found.
git diff --check — passed.

AI assistance was used during development to understand the issue and improve the test code. The changes were reviewed and tested locally before submission.

Related issue: #2273

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the DeepSource Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant