chore: Split up test_containers.py into data subdirectories#714
Merged
allenporter merged 2 commits intoPython-roborock:mainfrom Dec 29, 2025
Merged
chore: Split up test_containers.py into data subdirectories#714allenporter merged 2 commits intoPython-roborock:mainfrom
allenporter merged 2 commits intoPython-roborock:mainfrom
Conversation
Split up the existing containers test into tests for the protocol specific subdirectories, following the newr roborock.data module structure. This also updates all mock_data references to reference the tests path rather than a relative path.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the test suite by splitting the monolithic tests/test_containers.py file into protocol-specific subdirectories under tests/data/, following the structure of the roborock.data module. Import statements across multiple test files have been updated from relative to absolute paths.
Key Changes
- Split container tests into three separate files organized by protocol type (general, v1, and b01_q7)
- Updated all mock_data imports from relative paths to absolute
tests.mock_dataimports - Created snapshot directory for v1 container tests
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_containers.py | Removed monolithic test file (649 lines) |
| tests/data/test_containers.py | New general container tests (RoborockBase, UserData, HomeData, camelization) |
| tests/data/v1/test_v1_containers.py | New v1 protocol-specific tests (Status, Consumable, CleanRecord, MultiMapsList) |
| tests/data/b01_q7/test_b01_q7_containers.py | New b01_q7 protocol-specific tests (B01Props deserialization) |
| tests/data/v1/snapshots/test_v1_containers.ambr | Snapshot file for MultiMapsList test |
| tests/protocols/test_v1_protocol.py | Updated mock_data import to absolute path |
| tests/devices/traits/v1/fixtures.py | Updated mock_data import to absolute path |
| tests/devices/test_v1_device.py | Updated mock_data import to absolute path |
| tests/devices/test_mqtt_channel.py | Updated mock_data import to absolute path |
| tests/devices/test_device_manager.py | Updated mock_data import to absolute path |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split up the existing containers test into tests for the protocol specific subdirectories, following the newr roborock.data module structure.
This also updates all mock_data references to reference the tests path rather than a relative path.