test cases for AbstractObjectDetector#1261
Conversation
✅ Deploy Preview for viseron ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for this! Gonna take me a little while to read through it |
|
No problem. I am afraid to say there is a lot to it so understand review may take a while...or not be worth it :) |
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive unit/integration-style test suite for viseron.domains.object_detector.AbstractObjectDetector, improving confidence in filtering, zone handling, storage interactions, and lifecycle behavior while keeping tests isolated from background threads and side effects.
Changes:
- Introduces
tests/domains/object_detector/test_abstract_object_detector.pycovering constructor behavior, FoV filters, zones, storage insertion, and_object_detectionloop termination. - Updates
tests/conftest.pyMockViseronto mockdispatch_eventto prevent side effects and allow assertions in the new tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/domains/object_detector/test_abstract_object_detector.py | New test module validating AbstractObjectDetector core behaviors end-to-end with controlled mocks. |
| tests/conftest.py | Extends MockViseron to mock dispatch_event, supporting the new tests without triggering real event dispatch behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ConcreteObjectDetector(vis, base_config, CAMERA_IDENTIFIER) | ||
|
|
||
| # Aleasys called: ObjectDetectedBinarySensorFoV + ObjectDetectorFPSSensor |
There was a problem hiding this comment.
Typo in comment: “Aleasys called” is likely intended to be “Always called”. This may also trip codespell in CI.
| # Aleasys called: ObjectDetectedBinarySensorFoV + ObjectDetectorFPSSensor | |
| # Always called: ObjectDetectedBinarySensorFoV + ObjectDetectorFPSSensor |
There was a problem hiding this comment.
Should I use the Copilot option to commit the typo correction or create a new pull request or something else?
There was a problem hiding this comment.
You can just fix it yourself locally and push another commit, no need to create a new PR.
I used the "Commit suggestion" once and the AI messed up so i wouldnt trust it, even for that simple change😄
This PR contains test cases for the AbstractObjectDetector base class. Any and all feedback is welcome.