Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with tests #528

Open
python3-dev opened this issue Jan 2, 2025 · 0 comments
Open

Issues with tests #528

python3-dev opened this issue Jan 2, 2025 · 0 comments

Comments

@python3-dev
Copy link
Contributor

The current test coverage configurations could be improved for more meaningful insights.

Integration tests, such as test_cli, often inflate coverage metrics by traversing code without thoroughly testing individual components. While integration tests are valuable, unit tests are essential for independently verifying the behaviour of individual code units. For example:, the utils.py has just one unit test!

To ensure that the test coverage is meaningful, the test-measurement should primarily be driven by unit tests, which allow precise control over test scenarios and edge cases. Furthermore, the test-files itself must be excluded from the coverage measurement.

I propose separating unit and integration tests, using markers and/or directories for clear differentiation. While unit tests should be the primary source for coverage metrics, integration tests can still provide supplementary insights into overall code traversal. This balanced approach ensures both high-quality tests and reliable coverage metrics.

I would like to take up this issue.

Ref: #76 #521
Would love to know your comments @vinayak-mehta @bosd

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

No branches or pull requests

1 participant