The get_stream instance method should return a stream from a specific device.
()
| 133 | skip_when=not upytest.is_micropython, |
| 134 | ) |
| 135 | async def test_device_get_stream(): |
| 136 | """ |
| 137 | The get_stream instance method should return a stream from a specific |
| 138 | device. |
| 139 | """ |
| 140 | try: |
| 141 | devices = await media.list_devices() |
| 142 | |
| 143 | # Find a video input device to test with. |
| 144 | video_devices = [d for d in devices if d.kind == "videoinput"] |
| 145 | |
| 146 | if video_devices: |
| 147 | stream = await video_devices[0].get_stream() |
| 148 | assert hasattr(stream, "active") |
| 149 | except Exception: |
| 150 | # Permission denied or no devices available - test passes. |
| 151 | pass |
| 152 | |
| 153 | |
| 154 | async def test_device_filtering_by_kind(): |
nothing calls this directly
no test coverage detected