@@ -108,7 +108,7 @@ def test_install_conan_command_failure(
108108
109109 # Configure the API mock to fail on graph loading
110110 conan_mock_api .graph .load_graph_consumer .side_effect = Exception ('Conan API error: package not found' )
111-
111+
112112 # Mock ConanAPI constructor to return our configured mock
113113 mock_conan_api_constructor = mocker .patch ('cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api )
114114
@@ -123,8 +123,7 @@ def mock_resolve(requirement: Requirement) -> ConanDependency:
123123
124124 # Execute and verify exception is raised
125125 with pytest .raises (
126- ProviderInstallationError ,
127- match = 'Failed to install dependencies: Conan API error: package not found'
126+ ProviderInstallationError , match = 'Failed to install dependencies: Conan API error: package not found'
128127 ):
129128 plugin .install ()
130129
@@ -164,10 +163,10 @@ def test_install_with_profile_exception_fallback(
164163 conan_setup_mocks ['conan_api_constructor' ].assert_called_once ()
165164 conan_mock_api .profiles .get_default_host .assert_called_once ()
166165 # Note: get_default_build is not called because get_default_host throws exception first
167-
168- # Verify fallback profile creation was called (should be called twice for empty profiles )
169- assert conan_mock_api .profiles .get_profile .call_count >= EXPECTED_PROFILE_CALLS
170-
166+
167+ # Verify fallback profile creation was called (should be called twice for detect )
168+ assert conan_mock_api .profiles .detect .call_count >= EXPECTED_PROFILE_CALLS
169+
171170 # Verify the rest of the process continued
172171 conan_mock_api .graph .load_graph_consumer .assert_called_once ()
173172 conan_mock_api .install .install_binaries .assert_called_once ()
@@ -195,7 +194,7 @@ def test_publish_with_profile_exception_fallback(
195194
196195 # Configure the API mock to throw exception on first profile call
197196 conan_mock_api_publish .profiles .get_default_host .side_effect = Exception ('Profile configuration error' )
198-
197+
199198 # Mock ConanAPI constructor to return our configured mock
200199 mock_conan_api_constructor = mocker .patch (
201200 'cppython.plugins.conan.plugin.ConanAPI' , return_value = conan_mock_api_publish
@@ -208,10 +207,10 @@ def test_publish_with_profile_exception_fallback(
208207 mock_conan_api_constructor .assert_called_once ()
209208 conan_mock_api_publish .profiles .get_default_host .assert_called_once ()
210209 # Note: get_default_build is not called because get_default_host throws exception first
211-
212- # Verify fallback profile creation was called (should be called twice for empty profiles )
213- assert conan_mock_api_publish .profiles .get_profile .call_count >= EXPECTED_PROFILE_CALLS
214-
210+
211+ # Verify fallback profile creation was called (should be called twice for detect )
212+ assert conan_mock_api_publish .profiles .detect .call_count >= EXPECTED_PROFILE_CALLS
213+
215214 # Verify the rest of the process continued
216215 conan_mock_api_publish .export .export .assert_called_once ()
217216 conan_mock_api_publish .graph .load_graph_consumer .assert_called_once ()
@@ -248,10 +247,10 @@ def test_install_with_second_profile_exception_fallback(
248247 conan_setup_mocks ['conan_api_constructor' ].assert_called_once ()
249248 conan_mock_api .profiles .get_default_host .assert_called_once ()
250249 conan_mock_api .profiles .get_default_build .assert_called_once ()
251-
252- # Verify fallback profile creation was called (should be called twice for empty profiles )
253- assert conan_mock_api .profiles .get_profile .call_count >= EXPECTED_PROFILE_CALLS
254-
250+
251+ # Verify fallback profile creation was called (should be called twice for detect )
252+ assert conan_mock_api .profiles .detect .call_count >= EXPECTED_PROFILE_CALLS
253+
255254 # Verify the rest of the process continued
256255 conan_mock_api .graph .load_graph_consumer .assert_called_once ()
257256 conan_mock_api .install .install_binaries .assert_called_once ()
0 commit comments