Skip to content

Commit 99575fb

Browse files
committed
Don't us an unnecessary argument as a test parameter
1 parent 926aa63 commit 99575fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_common.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ def test_to_device_host(library):
6262
assert_allclose(x, expected)
6363

6464

65-
@pytest.mark.parametrize("target_library,func", is_functions.items())
65+
@pytest.mark.parametrize("target_library", is_functions.keys())
6666
@pytest.mark.parametrize("source_library", is_functions.keys())
67-
def test_asarray(source_library, target_library, func, request):
67+
def test_asarray(source_library, target_library, request):
6868
if source_library == "dask.array" and target_library == "torch":
6969
# Allow rest of test to execute instead of immediately xfailing
7070
# xref https://github.com/pandas-dev/pandas/issues/38902
@@ -74,7 +74,7 @@ def test_asarray(source_library, target_library, func, request):
7474
request.node.add_marker(pytest.mark.xfail(reason="Bug in dask raising error on conversion"))
7575
src_lib = import_(source_library, wrapper=True)
7676
tgt_lib = import_(target_library, wrapper=True)
77-
is_tgt_type = globals()[func]
77+
is_tgt_type = globals()[is_functions[target_library]]
7878

7979
a = src_lib.asarray([1, 2, 3])
8080
b = tgt_lib.asarray(a)

0 commit comments

Comments
 (0)