Skip to content

Commit 2cbb274

Browse files
committed
refactor: Rename test files for clarity and update documentation
- Rename test files to be more descriptive: - test_comprehensive_coverage.py → test_server_features.py - test_agent_feedback_fixes.py → test_search_relevance_fixes.py - test_evals.py → test_ai_usability_evaluations.py - test_edge_cases.py → test_error_handling_edge_cases.py - Update CLAUDE.md: - Update test count to 334 tests with 89% coverage - Add comprehensive test coverage bullet points - Document search relevance fixes and enhancements - Update README.md (maintaining snarky tone): - Update test count and coverage percentage - Add key improvements for search relevance fixes - Update test file count to 19 (perfectly organized) - Add enhanced Home Manager display to features - Update tests/README.md with new file names and descriptions
1 parent 1856ffb commit 2cbb274

File tree

7 files changed

+16
-8
lines changed

7 files changed

+16
-8
lines changed

CLAUDE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,16 @@ mypy mcp_nixos/
6262

6363
## Testing Approach
6464

65-
- 376+ async tests using pytest-asyncio
65+
- 334+ async tests using pytest-asyncio (89% coverage)
6666
- Real API calls (no mocks) for integration tests
6767
- Unit tests marked with `@pytest.mark.unit`
6868
- Integration tests marked with `@pytest.mark.integration`
6969
- Tests ensure plain text output (no XML/JSON leakage)
70+
- Comprehensive test coverage including:
71+
- Search relevance fixes (darwin_search dock prioritization)
72+
- Enhanced Home Manager option display
73+
- Error handling edge cases
74+
- AI usability evaluations
7075

7176
## Code Quality Commands
7277

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ nix profile install github:utensils/mcp-nixos
139139
- **Deduped flake results** - No more duplicate spam
140140
- **Version-aware searches** - Find that old Ruby version you need
141141
- **Category browsing** - Explore options systematically
142+
- **Search relevance fixes** - Darwin dock searches now find dock, not Docker (revolutionary!)
143+
- **Enhanced Home Manager display** - Now shows default values like a proper tool
142144

143145
## For Developers (The Brave Ones)
144146

@@ -205,11 +207,12 @@ twine upload dist/* # Upload to PyPI
205207
```
206208

207209
### Testing Philosophy
208-
- **367 tests** that actually test things (now async because why not)
210+
- **334 tests** that actually test things (now async because why not)
211+
- **89% coverage** because perfection is overrated (but we're close)
209212
- **Real API calls** because mocks are for cowards (await real_courage())
210213
- **Plain text validation** ensuring no XML leaks through
211214
- **Cross-platform tests** because Windows users deserve pain too
212-
- **15 test files** down from 29 because organization is a virtue
215+
- **19 test files** perfectly organized because naming things is half the battle
213216

214217
## Environment Variables
215218

tests/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This directory contains comprehensive tests for the MCP-NixOS server, organized
1515

1616
### Output and Formatting Tests
1717
- `test_plain_text_output.py` - Ensures all outputs are plain text (no XML/JSON leakage)
18-
- `test_edge_cases.py` - Edge case handling and error conditions
18+
- `test_error_handling_edge_cases.py` - Edge case handling and error conditions
1919

2020
### Integration and Real-World Tests
2121
- `test_integration.py` - Integration tests with real APIs (marked with @pytest.mark.integration)
@@ -24,11 +24,11 @@ This directory contains comprehensive tests for the MCP-NixOS server, organized
2424
- `test_context_awareness.py` - Context tracking and smart suggestions
2525

2626
### Specialized Tests
27-
- `test_agent_feedback_fixes.py` - Fixes based on agent feedback (darwin_search dock prioritization, hm_show enhancements)
28-
- `test_comprehensive_coverage.py` - Additional tests to improve code coverage to 90%+
27+
- `test_search_relevance_fixes.py` - Fixes based on agent feedback (darwin_search dock prioritization, hm_show enhancements)
28+
- `test_server_features.py` - Additional tests to improve code coverage to 90%+
2929
- `test_regression.py` - Regression tests for previously fixed bugs
3030
- `test_nixos_stats.py` - Statistics functionality tests
31-
- `test_evals.py` - AI usability evaluation tests
31+
- `test_ai_usability_evaluations.py` - AI usability evaluation tests
3232
- `test_mcp_tools.py` - MCP-specific tool tests
3333

3434
### Support Files

tests/test_evals.py renamed to tests/test_ai_usability_evaluations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def test_complete_firefox_installation_flow(self, mock_get, mock_post):
157157
# AI should now have all info needed to guide user through installation
158158

159159

160-
# ===== Content from test_evals_comprehensive.py =====
160+
# ===== Content from test_ai_usability_evaluations_comprehensive.py =====
161161
@dataclass
162162
class EvalScenario:
163163
"""Represents an evaluation scenario."""
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)