Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c467526

Browse files
committed
address review comment + add missing API ref
1 parent 4ca551c commit c467526

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

cuda_bindings/docs/source/module/utils.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
44
.. module:: cuda.bindings.utils
55

6-
Utils module
7-
============
6+
utils
7+
=====
88

99
Functions
1010
---------
1111

1212
.. autosummary::
1313
:toctree: generated/
1414

15+
get_cuda_native_handle
1516
get_minimal_required_cuda_ver_from_ptx_ver
1617
get_ptx_ver

cuda_bindings/tests/test_utils.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ def test_get_handle(target):
7575
assert handle == ptr
7676

7777

78-
def test_get_handle_error():
79-
obj = (1, 2, 3, 4)
80-
with pytest.raises(TypeError) as e:
81-
handle = get_cuda_native_handle(obj)
82-
obj = 1234
78+
@pytest.mark.parametrize(
79+
"target",
80+
(
81+
(1, 2, 3, 4),
82+
[5, 6],
83+
{},
84+
None,
85+
)
86+
)
87+
def test_get_handle_error(target):
8388
with pytest.raises(TypeError) as e:
84-
handle = get_cuda_native_handle(obj)
89+
handle = get_cuda_native_handle(target)

0 commit comments

Comments
 (0)