jorisvandenbossche commented on code in PR #43590:
URL: https://github.com/apache/arrow/pull/43590#discussion_r1768909590


##########
python/pyarrow/tests/test_io.py:
##########
@@ -710,6 +710,15 @@ def test_non_cpu_buffer(pickle_module):
     # Sliced buffers with same address
     assert buf_on_gpu_sliced.equals(cuda_buf[2:4])
 
+    # Testing copying buffer
+    mm = ctx.memory_manager
+    for dest in [mm, mm.device]:
+        buf2 = cuda_buf.copy(dest)
+        cuda_buf2 = cuda.CudaBuffer.from_buffer(buf2)
+        assert cuda_buf2.size == cuda_buf.size
+        assert cuda_buf2.copy_to_host()[:] == b'testing'
+        assert cuda_buf2.device == mm.device

Review Comment:
   ```suggestion
           assert buf2.device == mm.device
   ```
   
   To test the actual resulting Buffer of the `copy` method?



-- 
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]

Reply via email to