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

Function test_dlpack_versioned_capsule

python/pyarrow/tests/test_dlpack.py:301–303  ·  view source on GitHub ↗
(obj, max_version, copy)

Source from the content-addressed store, hash-verified

299@pytest.mark.parametrize('max_version', [(1, 0), (1, 3), (2, 0)])
300@pytest.mark.parametrize('copy', [None, False, True])
301def test_dlpack_versioned_capsule(obj, max_version, copy):
302 capsule = obj.__dlpack__(max_version=max_version, copy=copy)
303 assert PyCapsule_IsValid(capsule, b"dltensor_versioned") is True
304
305
306@requires_numpy_version("2.1.0")

Callers

nothing calls this directly

Calls 2

PyCapsule_IsValidFunction · 0.70
__dlpack__Method · 0.45

Tested by

no test coverage detected