File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -312,3 +312,29 @@ def test_get_unpartitioned_parent_device_from_sub_device():
312
312
pytest .skip ("Default device can not be partitioned" )
313
313
assert isinstance (sdevs , list ) and len (sdevs ) > 0
314
314
assert dev == sdevs [0 ].get_unpartitioned_parent_device ()
315
+
316
+
317
+ def test_composite_device_method ():
318
+ """
319
+ Test that the composite_device method returns a composite
320
+ device found in ``dpctl.get_composite_devices()``
321
+ """
322
+ devices = dpctl .get_devices ()
323
+ composite_devices = dpctl .get_composite_devices ()
324
+ for d in devices :
325
+ if d .has_aspect_is_component :
326
+ Cd = d .composite_device
327
+ assert Cd in composite_devices
328
+
329
+
330
+ def test_get_component_devices_from_composite ():
331
+ """
332
+ Test that the component_devices method returns component
333
+ root devices.
334
+ """
335
+ devices = dpctl .get_devices ()
336
+ composite_devices = dpctl .get_composite_devices ()
337
+ for Cd in composite_devices :
338
+ component_devices = Cd .component_devices
339
+ for d in component_devices :
340
+ assert d in devices
You can’t perform that action at this time.
0 commit comments