danepitkin commented on code in PR #43392:
URL: https://github.com/apache/arrow/pull/43392#discussion_r1688784938
##########
python/pyarrow/tests/test_cuda.py:
##########
@@ -57,6 +57,18 @@ def test_Context():
assert global_context.device_number == 0
assert global_context1.device_number == cuda.Context.get_num_devices() - 1
+ mm = global_context.memory_manager()
+ assert not mm.is_cpu
+ assert "<pyarrow.MemoryManager device: CudaDevice" in repr(mm)
+
+ dev = global_context.device()
+ assert dev == mm.device
+
+ assert not dev.is_cpu
+ assert dev.device_id == 0
+ assert dev.device_type == pa.DeviceAllocationType.CUDA
+ assert "<pyarrow.Device: CudaDevice" in repr(dev)
Review Comment:
nit: IMO asserting on repr output is not necessary. We already check the
`device_type`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]