Skip to content

Commit 7a3d69c

Browse files
jeremymanningclaude
andcommitted
Fix package manager detection tests and code formatting
- Fix two failing tests that expected pip fallback but got conda - Add proper mocking of conda availability in package manager tests - Apply black formatting to test_enhanced_features.py - All 298 tests now pass with proper linting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 71486d0 commit 7a3d69c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/test_enhanced_features.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,14 @@ def test_get_package_manager_command_auto_uv_available(self, mock_uv_available):
199199
assert result == "uv pip"
200200
mock_uv_available.assert_called_once()
201201

202+
@patch("clustrix.utils.is_conda_available")
202203
@patch("clustrix.utils.is_uv_available")
203-
def test_get_package_manager_command_auto_uv_unavailable(self, mock_uv_available):
204+
def test_get_package_manager_command_auto_uv_unavailable(
205+
self, mock_uv_available, mock_conda_available
206+
):
204207
"""Test auto-detection when uv is not available."""
205208
mock_uv_available.return_value = False
209+
mock_conda_available.return_value = False
206210
config = ClusterConfig(package_manager="auto")
207211

208212
result = get_package_manager_command(config)
@@ -548,10 +552,12 @@ def test_full_dependency_and_uv_workflow(self, mock_uv_available, mock_run):
548552
assert "numpy" in requirements
549553
assert "requests" in requirements
550554

555+
@patch("clustrix.utils.is_conda_available")
551556
@patch("clustrix.utils.is_uv_available")
552-
def test_graceful_degradation_no_uv(self, mock_uv_available):
557+
def test_graceful_degradation_no_uv(self, mock_uv_available, mock_conda_available):
553558
"""Test graceful degradation when uv is not available."""
554559
mock_uv_available.return_value = False
560+
mock_conda_available.return_value = False
555561

556562
config = ClusterConfig(package_manager="auto")
557563
pkg_manager = get_package_manager_command(config)

0 commit comments

Comments
 (0)