Improving test coverage
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
This issue gathers some areas where we need to improve our test coverage.
You can view pyo3's test coverage online here or locally by following the steps here (do this when writing tests, so you can check them).
In particular (but not limited to) these areas need improvement:
- buffer.rs https://github.com/PyO3/pyo3/pull/2462
- pycell.rs
- types/function.rs https://github.com/PyO3/pyo3/pull/2462
- types/slice.rs https://github.com/PyO3/pyo3/pull/2462
- once_cell
Please keep in mind to write meaningful tests - do not just write tests that take the happy path, but also tests that take error paths or corner cases.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the coverage instructions in Contributing.md and inspect the uncovered areas in src/pycell.rs and src/once_cell.rs using the linked Codecov report. Add meaningful tests for error paths and corner cases, then rerun coverage locally to verify the selected areas improve.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100