Fix MicroPython media tests, if no permission is given for a video device.

This commit is contained in:
Nicholas H.Tollervey
2025-03-19 15:39:21 +00:00
parent f5bd62a8f6
commit 61854bcd14

View File

@@ -2,6 +2,8 @@
Tests for the PyScript media module.
"""
import upytest
from pyscript import media
@@ -33,6 +35,7 @@ async def test_device_enumeration():
), "Dictionary access should match property access"
@upytest.skip("Waiting on a bug-fix in MicroPython, for this test to work.", skip_when=upytest.is_micropython)
async def test_video_stream_acquisition():
"""Test video stream."""
try:
@@ -55,6 +58,7 @@ async def test_video_stream_acquisition():
), f"Stream acquisition attempted but may require permissions: {str(e)}"
@upytest.skip("Waiting on a bug-fix in MicroPython, for this test to work.", skip_when=upytest.is_micropython)
async def test_custom_video_constraints():
"""Test loading video with custom constraints."""
try: