You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by "alisha-1000 (via GitHub)" <gi...@apache.org> on 2026/02/23 08:52:36 UTC
[PR] Improve coverage for qumat/qdp.py by testing stub fallback behavior [mahout]
alisha-1000 opened a new pull request, #1081:
URL: https://github.com/apache/mahout/pull/1081
### Related Issues
N/A
### Changes
- [ ] Bug fix
- [ ] New feature
- [ ] Refactoring
- [ ] Documentation
- [x] Test
- [ ] CI/CD pipeline
- [ ] Other
### Why
`qumat/qdp.py` provides a fallback stub implementation when the native `_qdp`
extension is not available. This behavior is important for environments
without GPU/native builds, but it was not explicitly covered by tests.
Adding dedicated tests ensures that the fallback mechanism works as expected
and remains stable over time.
### How
- Added `testing/qumat/test_qdp_stub.py`
- Forced a fresh import of `qumat.qdp` to trigger the fallback code path
- Verified that:
- An `ImportWarning` is emitted when `_qdp` is unavailable
- Stub classes (`QdpEngine`, `QuantumTensor`) raise `ImportError` on instantiation
- `__all__` exports are correctly defined
All existing tests pass locally:
- 561 passed
- 91 skipped
- Total coverage: 93% (442 statements, 32 missed)
This change improves coverage for `qumat/qdp.py` without modifying runtime behavior or affecting the native extension logic.
## Checklist
- [x] Added or updated unit tests for all changes
- [ ] Added or updated documentation for all changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve coverage for qumat/qdp.py by testing stub fallback behavior [mahout]
Posted by "alisha-1000 (via GitHub)" <gi...@apache.org>.
alisha-1000 closed pull request #1081: Improve coverage for qumat/qdp.py by testing stub fallback behavior
URL: https://github.com/apache/mahout/pull/1081
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Improve coverage for qumat/qdp.py by testing stub fallback behavior [mahout]
Posted by "alisha-1000 (via GitHub)" <gi...@apache.org>.
alisha-1000 commented on PR #1081:
URL: https://github.com/apache/mahout/pull/1081#issuecomment-3943862526
Superseded by #1084, which contains a more complete and refined coverage update for `qumat/qdp.py`.
Closing this PR to avoid duplication and keep the history clean.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mahout.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org