@@ -57,7 +57,7 @@ def test_to_cuda_device():
5757 cuda_device = device .to_cuda_device ()
5858
5959 assert isinstance (cuda_device , CudaDevice )
60- assert cuda_device .uuid == device .uuid
60+ assert cuda_device .uuid == device .uuid_without_prefix
6161
6262 # Technically, this test will only work with PCI devices, but are there
6363 # non-PCI devices we need to support?
@@ -227,9 +227,9 @@ def test_device_serial():
227227 assert len (serial ) > 0
228228
229229
230- def test_device_uuid ():
230+ def test_device_uuid_without_prefix ():
231231 for device in system .Device .get_all_devices ():
232- uuid = device .uuid
232+ uuid = device .uuid_without_prefix
233233 assert isinstance (uuid , str )
234234
235235 # Expands to GPU-8hex-4hex-4hex-4hex-12hex, where 8hex means 8 consecutive
@@ -750,9 +750,9 @@ def test_mig():
750750 assert isinstance (mig_device , system .Device )
751751
752752
753- def test_uuid_with_prefix ():
753+ def test_uuid ():
754754 for device in system .Device .get_all_devices ():
755- uuid_with_prefix = device .uuid_with_prefix
756- assert isinstance (uuid_with_prefix , str )
757- assert uuid_with_prefix .startswith (("GPU-" , "MIG-" ))
758- assert uuid_with_prefix [ 4 :] == device .uuid
755+ uuid = device .uuid
756+ assert isinstance (uuid , str )
757+ assert uuid .startswith (("GPU-" , "MIG-" ))
758+ assert uuid == device .uuid
0 commit comments