Skip to content

Commit 2c1a662

Browse files
committed
Rename Some Tests
1 parent 55e792e commit 2c1a662

File tree

5 files changed

+62
-59
lines changed

5 files changed

+62
-59
lines changed

tests/unit/plugins/cmake/test_schema.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@ class TestCacheVariable:
77
"""Tests for the CacheVariable class"""
88

99
@staticmethod
10-
def test_cache_variable_bool() -> None:
10+
def test_bool() -> None:
1111
"""Tests the CacheVariable class with a boolean value"""
1212
var = CacheVariable(type=VariableType.BOOL, value=True)
1313
assert var.type == VariableType.BOOL
1414
assert var.value is True
1515

1616
@staticmethod
17-
def test_cache_variable_string() -> None:
17+
def test_string() -> None:
1818
"""Tests the CacheVariable class with a string value"""
1919
var = CacheVariable(type=VariableType.STRING, value='SomeValue')
2020
assert var.type == VariableType.STRING
2121
assert var.value == 'SomeValue'
2222

2323
@staticmethod
24-
def test_cache_variable_null_type() -> None:
24+
def test_null_type() -> None:
2525
"""Tests the CacheVariable class with a null type"""
2626
var = CacheVariable(type=None, value='Unset')
2727
assert var.type is None
2828
assert var.value == 'Unset'
2929

3030
@staticmethod
31-
def test_cache_variable_bool_value_as_string() -> None:
31+
def test_bool_value_as_string() -> None:
3232
"""Tests the CacheVariable class with a boolean value as a string"""
3333
# CMake allows bool as "TRUE"/"FALSE" as well
3434
var = CacheVariable(type=VariableType.BOOL, value='TRUE')
3535
assert var.value == 'TRUE'
3636

3737
@staticmethod
38-
def test_cache_variable_type_optional() -> None:
38+
def test_type_optional() -> None:
3939
"""Tests the CacheVariable class with an optional type"""
4040
# type is optional
4141
var = CacheVariable(value='SomeValue')

tests/unit/plugins/conan/test_install.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def fixture_plugin_type() -> type[ConanProvider]:
4949
"""
5050
return ConanProvider
5151

52-
def test_install_with_dependencies(
52+
def test_with_dependencies(
5353
self,
5454
plugin: ConanProvider,
5555
conan_temp_conanfile: Path,
@@ -87,7 +87,7 @@ def test_install_with_dependencies(
8787
# Verify ConanAPI constructor was called
8888
conan_setup_mocks['conan_api_constructor'].assert_called_once()
8989

90-
def test_install_conan_command_failure(
90+
def test_conan_command_failure(
9191
self,
9292
plugin: ConanProvider,
9393
conan_temp_conanfile: Path,
@@ -117,7 +117,7 @@ def test_install_conan_command_failure(
117117

118118
# Mock resolve_conan_dependency
119119
def mock_resolve(requirement: Requirement) -> ConanDependency:
120-
return ConanDependency(name=requirement.name, version_ge=None)
120+
return ConanDependency(name=requirement.name)
121121

122122
mocker.patch('cppython.plugins.conan.plugin.resolve_conan_dependency', side_effect=mock_resolve)
123123

@@ -136,7 +136,7 @@ def mock_resolve(requirement: Requirement) -> ConanDependency:
136136
# Verify Conan API was attempted
137137
mock_conan_api_constructor.assert_called_once()
138138

139-
def test_install_with_default_profiles(
139+
def test_with_default_profiles(
140140
self,
141141
plugin: ConanProvider,
142142
conan_temp_conanfile: Path,

tests/unit/plugins/conan/test_publish.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def fixture_plugin_type() -> type[ConanProvider]:
4242
"""
4343
return ConanProvider
4444

45-
def test_publish_local_only(
45+
def test_local_only(
4646
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
4747
) -> None:
4848
"""Test that publish with remotes=[] only exports and builds locally
@@ -87,7 +87,7 @@ def test_publish_local_only(
8787
# Verify upload was NOT called for local mode
8888
conan_mock_api_publish.upload.upload_full.assert_not_called()
8989

90-
def test_publish_with_upload(
90+
def test_with_upload(
9191
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
9292
) -> None:
9393
"""Test that publish with remotes=['conancenter'] exports, builds, and uploads
@@ -121,7 +121,7 @@ def test_publish_with_upload(
121121
conan_mock_api_publish.list.select.assert_called_once()
122122
conan_mock_api_publish.upload.upload_full.assert_called_once()
123123

124-
def test_publish_no_remotes_configured(
124+
def test_no_remotes_configured(
125125
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
126126
) -> None:
127127
"""Test that publish raises error when no remotes are configured for upload
@@ -149,7 +149,7 @@ def test_publish_no_remotes_configured(
149149
with pytest.raises(ProviderConfigurationError, match='No configured remotes found'):
150150
plugin.publish()
151151

152-
def test_publish_no_packages_found(
152+
def test_no_packages_found(
153153
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
154154
) -> None:
155155
"""Test that publish raises error when no packages are found to upload
@@ -179,7 +179,7 @@ def test_publish_no_packages_found(
179179
with pytest.raises(ProviderInstallationError, match='No packages found to upload'):
180180
plugin.publish()
181181

182-
def test_publish_with_default_profiles(
182+
def test_with_default_profiles(
183183
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
184184
) -> None:
185185
"""Test that publish uses pre-resolved profiles from plugin construction
@@ -209,7 +209,7 @@ def test_publish_with_default_profiles(
209209
assert call_args.kwargs['profile_host'] == plugin.data.host_profile
210210
assert call_args.kwargs['profile_build'] == plugin.data.build_profile
211211

212-
def test_publish_upload_parameters(
212+
def test_upload_parameters(
213213
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
214214
) -> None:
215215
"""Test that publish upload is called with correct parameters
@@ -254,7 +254,7 @@ def test_publish_upload_parameters(
254254
dry_run=False,
255255
)
256256

257-
def test_publish_list_pattern_creation(
257+
def test_list_pattern_creation(
258258
self, plugin: ConanProvider, conan_mock_api_publish: Mock, conan_temp_conanfile: None, mocker: MockerFixture
259259
) -> None:
260260
"""Test that publish creates correct ListPattern for package selection

0 commit comments

Comments
 (0)