Skip to content

chore(v1): drop the duplicate status read-back close test - #1085

Merged
allenporter merged 1 commit into
Python-roborock:mainfrom
infy1995:chore/v1-drop-duplicate-status-read-back-test
Nov 24, 2026
Merged

allenporter merged 1 commit into
Python-roborock:mainfrom
infy1995:chore/v1-drop-duplicate-status-read-back-test

Conversation

@infy1995

@infy1995 infy1995 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #1067, which was merged with one cleanup left for later: tests/devices/traits/v1/test_init.py duplicates coverage that test_status.py already has.

What and why

test_init.py held one test, test_close_cancels_status_read_back. Closing the status trait with a pending or in-flight read-back is already covered in tests/devices/traits/v1/test_status.py by test_close_cancels_pending_read_back and test_close_cancels_in_flight_read_back.

Those tests call StatusTrait.close() directly, so nothing checked that PropertiesApi.close() still calls status.close(). This PR adds test_properties_api_close_cancels_pending_read_back to test_status.py for that path and deletes test_init.py.

The new test fails without the call: with self.status.close() removed from PropertiesApi.close(), a push-scheduled read-back still runs and the test fails. With the call in place it passes.

Conflicts with open PRs

I checked for a duplicate (no open PR does the same cleanup) and test-merged this branch against every open PR that touches tests/devices/traits/v1/test_status.py or test_init.py (git merge-tree, on top of current main):

PR Result
#1055, #1064 Clean. Neither changes test_init.py or adds the new test.
#1066, #1025 Clean.
#1024, #959 Conflict in tests/devices/traits/v1/test_status.py (#959 also in roborock/devices/traits/v1/status.py). Both already conflict with current main without this PR, so the conflict is not caused by it.

Testing

  • pytest: full suite passes (2815 passed), run with two hash seeds.
  • pre-commit run --all-files (ruff, mypy, codespell) passes.

Follow-up to Python-roborock#1067, where the maintainer noted that test_init.py is redundant
because test_status.py already covers closing the status trait. Closing through
PropertiesApi.close() is now covered in test_status.py as well.
@allenporter
allenporter merged commit 2e1cf1f into Python-roborock:main Nov 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants