File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,16 @@ def test_enable_disable_peer(platform_name):
390
390
)
391
391
392
392
393
- def test_peer_device_arg_validation ():
393
+ @pytest .mark .parametrize (
394
+ "method" ,
395
+ [
396
+ "can_access_peer_access_supported" ,
397
+ "can_access_peer_atomics_supported" ,
398
+ "enable_peer_access" ,
399
+ "disable_peer_access" ,
400
+ ],
401
+ )
402
+ def test_peer_device_arg_validation (method ):
394
403
"""
395
404
Test for validation of arguments to peer access related methods.
396
405
"""
@@ -399,11 +408,6 @@ def test_peer_device_arg_validation():
399
408
except dpctl .SyclDeviceCreationError :
400
409
pytest .skip ("No default device available" )
401
410
bad_dev = dict ()
411
+ callable = getattr (dev , method )
402
412
with pytest .raises (TypeError ):
403
- dev .can_access_peer_access_supported (bad_dev )
404
- with pytest .raises (TypeError ):
405
- dev .can_access_peer_atomics_supported (bad_dev )
406
- with pytest .raises (TypeError ):
407
- dev .enable_peer_access (bad_dev )
408
- with pytest .raises (TypeError ):
409
- dev .disable_peer_access (bad_dev )
413
+ callable (bad_dev )
You can’t perform that action at this time.
0 commit comments