@@ -1524,17 +1524,17 @@ class TestInstallDependenciesEdgeCases:
15241524 """Test dependency installation edge cases."""
15251525
15261526 @patch ('platform.system' , return_value = 'Windows' )
1527- @patch ('setup_environment.run_bash_command ' )
1528- def test_install_dependencies_windows_bash_execution (self , mock_bash , _mock_system ):
1529- """Test bash execution for unknown commands on Windows."""
1530- mock_bash .return_value = subprocess .CompletedProcess ([], 0 , '' , '' )
1527+ @patch ('setup_environment.run_command ' )
1528+ def test_install_dependencies_windows_powershell_execution (self , mock_run , _mock_system ):
1529+ """Test PowerShell execution for unknown commands on Windows."""
1530+ mock_run .return_value = subprocess .CompletedProcess ([], 0 , '' , '' )
15311531
15321532 result = setup_environment .install_dependencies ({'windows' : ['custom-command install package' ]})
15331533 assert result is True
15341534
1535- # Should use bash for command execution
1536- call_args = mock_bash .call_args [0 ][0 ]
1537- assert ' custom-command install package' in call_args
1535+ # Should use PowerShell with -NoProfile flag for command execution
1536+ call_args = mock_run .call_args [0 ][0 ]
1537+ assert call_args == [ 'powershell' , '-NoProfile' , '-Command' , ' custom-command install package']
15381538
15391539 @patch ('platform.system' , return_value = 'Linux' )
15401540 @patch ('setup_environment.run_command' )
@@ -1550,17 +1550,17 @@ def test_install_dependencies_uv_tool_force_linux(self, mock_run, _mock_system):
15501550 assert 'uv tool install --force pytest' in ' ' .join (call_args )
15511551
15521552 @patch ('platform.system' , return_value = 'Windows' )
1553- @patch ('setup_environment.run_bash_command ' )
1554- def test_install_dependencies_failure_continues (self , mock_bash , _mock_system ):
1553+ @patch ('setup_environment.run_command ' )
1554+ def test_install_dependencies_failure_continues (self , mock_run , _mock_system ):
15551555 """Test that dependency installation continues after failure."""
1556- mock_bash .side_effect = [
1556+ mock_run .side_effect = [
15571557 subprocess .CompletedProcess ([], 1 , '' , 'Error' ), # First fails
15581558 subprocess .CompletedProcess ([], 0 , '' , '' ), # Second succeeds
15591559 ]
15601560
15611561 result = setup_environment .install_dependencies ({'windows' : ['failing-dep' , 'working-dep' ]})
15621562 assert result is True
1563- assert mock_bash .call_count == 2
1563+ assert mock_run .call_count == 2
15641564
15651565
15661566class TestDeriveBaseURLEdgeCases :
0 commit comments