77import pytest
88import torch
99
10- from deepecho .models ._utils import _set_device , _validate_gpu_parameters , validate_and_set_device
10+ from deepecho .models ._utils import _get_enable_gpu_value , _set_device , validate_and_set_device
1111
1212
13- def test__validate_gpu_parameterss ():
14- """Test the ``_validate_gpu_parameters `` method."""
13+ def test__get_enable_gpu_values ():
14+ """Test the ``_get_enable_gpu_value `` method."""
1515 # Setup
1616 expected_error = re .escape (
1717 'Cannot resolve the provided values of `cuda` and `enable_gpu` parameters. '
@@ -23,13 +23,13 @@ def test__validate_gpu_parameterss():
2323 )
2424
2525 # Run
26- enable_gpu_1 = _validate_gpu_parameters (False , None )
27- enable_gpu_2 = _validate_gpu_parameters (True , None )
26+ enable_gpu_1 = _get_enable_gpu_value (False , None )
27+ enable_gpu_2 = _get_enable_gpu_value (True , None )
2828 with pytest .warns (FutureWarning , match = expected_warning ):
29- enable_gpu_3 = _validate_gpu_parameters (True , False )
29+ enable_gpu_3 = _get_enable_gpu_value (True , False )
3030
3131 with pytest .raises (ValueError , match = expected_error ):
32- _validate_gpu_parameters (False , True )
32+ _get_enable_gpu_value (False , True )
3333
3434 # Assert
3535 assert enable_gpu_1 is False
@@ -60,7 +60,7 @@ def test__set_device():
6060
6161
6262@patch ('deepecho.models._utils._set_device' )
63- @patch ('deepecho.models._utils._validate_gpu_parameters ' )
63+ @patch ('deepecho.models._utils._get_enable_gpu_value ' )
6464def test_validate_and_set_device (mock_validate , mock_set_device ):
6565 """Test the ``validate_and_set_device`` method."""
6666 # Setup
0 commit comments