Add comprehensive CLI path tests and fix remaining issues

Added 18 new tests covering all aspects of CLI path corrections:
- Docstring/usage examples (5 tests)
- Print statements (3 tests)
- Subprocess calls (1 test)
- Documentation files (3 tests)
- Help output functionality (2 tests)
- Script executability (4 tests)

All tests verify that:
1. Scripts can be executed with cli/ prefix
2. Usage examples show correct paths
3. Print statements guide users correctly
4. No old hardcoded paths remain
5. Documentation is consistent

Fixed additional issues found by tests:
- cli/enhance_skill.py: Fixed 4 more occurrences in docstring and error message
- cli/package_skill.py: Fixed 1 occurrence in help epilog

Test Results:
- Total tests: 118 (100 existing + 18 new)
- All tests passing: 100%
- Coverage: CLI paths, scraper features, config validation, integration, MCP server

Related: PR #145
This commit is contained in:
yusyus
2025-10-22 21:45:51 +03:00
parent 581dbc792d
commit c03186574d
3 changed files with 312 additions and 5 deletions

View File

@@ -4,9 +4,9 @@ SKILL.md Enhancement Script
Uses Claude API to improve SKILL.md by analyzing reference documentation.
Usage:
python3 enhance_skill.py output/steam-inventory/
python3 enhance_skill.py output/react/
python3 enhance_skill.py output/godot/ --api-key YOUR_API_KEY
python3 cli/enhance_skill.py output/steam-inventory/
python3 cli/enhance_skill.py output/react/
python3 cli/enhance_skill.py output/godot/ --api-key YOUR_API_KEY
"""
import os
@@ -279,7 +279,7 @@ Examples:
print("\nSet your API key:")
print(" export ANTHROPIC_API_KEY=sk-ant-...")
print("Or provide it directly:")
print(f" python3 enhance_skill.py {skill_dir} --api-key sk-ant-...")
print(f" python3 cli/enhance_skill.py {skill_dir} --api-key sk-ant-...")
sys.exit(1)
except Exception as e:
print(f"❌ Unexpected error: {e}")