MCPcopy Create free account
hub / github.com/apache/arrow / test_buffer_device

Function test_buffer_device

python/pyarrow/tests/test_device.py:36–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35
36def test_buffer_device():
37 arr = pa.array([0, 1, 2])
38 buf = arr.buffers()[1]
39 assert buf.device_type == pa.DeviceAllocationType.CPU
40 assert isinstance(buf.device, pa.Device)
41 assert isinstance(buf.memory_manager, pa.MemoryManager)
42 assert buf.is_cpu
43 assert buf.device.is_cpu
44 assert buf.device == pa.default_cpu_memory_manager().device
45 assert buf.memory_manager.is_cpu
46
47
48def test_copy_to():

Callers

nothing calls this directly

Calls 2

buffersMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected