Fix device_each to skip instead of fail when no matching device#14866
Merged
Nir-Az merged 1 commit intorealsenseai:developmentfrom Mar 26, 2026
Merged
Fix device_each to skip instead of fail when no matching device#14866Nir-Az merged 1 commit intorealsenseai:developmentfrom
Nir-Az merged 1 commit intorealsenseai:developmentfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts device-resolution behavior in the unit-test pytest plugin so device_each()-only tests skip (not fail) when no matching hardware is connected, while preserving the stricter “missing required device == fail” behavior for device().
Changes:
- Detect whether a
device()marker is present when no devices match. pytest.failonly whendevice()is present; otherwisepytest.skipfordevice_each()-only cases.- Keeps the existing “all matching devices excluded” case as a skip.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2 tasks
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.
Summary
pytest.skiptopytest.failwhen a required device is missing, which is correct fordevice()markerdevice_each()which should skip when no matching device exists (e.g. D585S on a Jetson with only D401)pytest.failwhen adevice()marker is present;device_each()-only tests skip gracefullyTest plan
pytest-ah-configurations.py(device_each D585S) skips when no D585S connectedpytest-backend-vs-frame-timestamp.py(device D400*) fails when no D400 connected