@@ -86,20 +86,16 @@ def test_device_getitem():
86
86
)
87
87
async def test_list_devices ():
88
88
"""Test that list_devices returns a list of Device objects."""
89
- try :
90
- devices = await media .list_devices ()
91
- assert isinstance (devices , list ), "list_devices should return a list"
92
-
93
- # We don't assert on the number of devices since that's environment-dependent
94
- if devices :
95
- device = devices [0 ]
96
- assert hasattr (device , "id" ), "Device should have id property"
97
- assert hasattr (device , "group" ), "Device should have group property"
98
- assert hasattr (device , "kind" ), "Device should have kind property"
99
- assert hasattr (device , "label" ), "Device should have label property"
100
- except Exception as e :
101
- # Ensure test passes even if there's a permission issue
102
- assert True , f"list_devices failed but test passes: { str (e )} "
89
+ devices = await media .list_devices ()
90
+ assert isinstance (devices , list ), "list_devices should return a list"
91
+
92
+ # We don't assert on the number of devices since that's environment-dependent
93
+ if devices :
94
+ device = devices [0 ]
95
+ assert hasattr (device , "id" ), "Device should have id property"
96
+ assert hasattr (device , "group" ), "Device should have group property"
97
+ assert hasattr (device , "kind" ), "Device should have kind property"
98
+ assert hasattr (device , "label" ), "Device should have label property"
103
99
104
100
105
101
@upytest .skip (
@@ -108,12 +104,8 @@ async def test_list_devices():
108
104
)
109
105
async def test_device_load ():
110
106
"""Test that Device.load returns a media stream."""
111
- try :
112
- stream = await media .Device .load (video = True )
113
- assert hasattr (stream , "active" ), "Stream should have active property"
114
- except Exception as e :
115
- # Ensure test passes even if there's a permission issue
116
- assert True , f"Device.load failed but test passes: { str (e )} "
107
+ stream = await media .Device .load (video = True )
108
+ assert hasattr (stream , "active" ), "Stream should have active property"
117
109
118
110
119
111
@upytest .skip (
0 commit comments