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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to