Skip to content

Commit

Permalink
Use pytest_cases.fixture to fix warnings. (#5798)
Browse files Browse the repository at this point in the history
This PR fixes some warnings in tests by using `pytest_cases.fixture` instead of `pytest_cases.fixture_plus`.

```
test_device_selection.py:198
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:198: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:235
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:235: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:277
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:277: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:317
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:317: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:357
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:357: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:392
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:392: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:440
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:440: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:480
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:480: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(

test_device_selection.py:519
  /__w/cuml/cuml/python/cuml/tests/test_device_selection.py:519: DeprecationWarning: `pytest_fixture_plus` and `fixture_plus` are deprecated. Please use the new alias `fixture`. See pytest-dev/pytest#6475
    @fixture_plus(
```

Authors:
  - Bradley Dice (https://github.com/bdice)
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #5798
  • Loading branch information
bdice authored Mar 27, 2024
1 parent d098745 commit 4a4d313
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions python/cuml/tests/test_device_selection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,7 @@
from sklearn.decomposition import PCA as skPCA
from sklearn.decomposition import TruncatedSVD as skTruncatedSVD
from sklearn.datasets import make_regression, make_blobs
from pytest_cases import fixture_union, fixture_plus
from pytest_cases import fixture_union, fixture
from importlib import import_module
import inspect
import pickle
Expand Down Expand Up @@ -195,7 +195,7 @@ def fixture_generation_helper(params):
return {"scope": "session", "params": param_combis, "ids": ids}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -232,7 +232,7 @@ def linreg_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -274,7 +274,7 @@ def logreg_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -314,7 +314,7 @@ def lasso_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -354,7 +354,7 @@ def elasticnet_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -389,7 +389,7 @@ def ridge_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["cupy"],
Expand Down Expand Up @@ -437,7 +437,7 @@ def umap_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -477,7 +477,7 @@ def pca_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down Expand Up @@ -516,7 +516,7 @@ def tsvd_test_data(request):
}


@fixture_plus(
@fixture(
**fixture_generation_helper(
{
"input_type": ["numpy", "dataframe", "cupy", "cudf", "numba"],
Expand Down

0 comments on commit 4a4d313

Please sign in to comment.