Skip to content

Commit 0c1a624

Browse files
authored
Merge pull request #113 from serv-c/claude/issue-111-20250731-1257
docs: add unit testing instructions to CLAUDE.md
2 parents fa0ad43 + 218b2e5 commit 0c1a624

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

CLAUDE.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,34 @@ The project includes type stubs and typing information:
2121
2. Run type checking: `mypy servc --check-untyped-defs`
2222
3. Fix any type issues before committing
2323

24+
## Unit Testing with unittest
25+
26+
### Setup
27+
This project uses Python's built-in unittest framework for testing. The coverage dependency is included in `requirements-dev.txt` for test coverage analysis.
28+
29+
### Required Commands
30+
To enable full unit testing capabilities, Claude needs permission to run:
31+
- `python -m unittest discover tests` - Run all unit tests in the tests directory
32+
- `python -m unittest tests.test_config` - Run specific test module
33+
- `python -m coverage run -m unittest discover tests` - Run tests with coverage analysis
34+
- `python -m coverage report` - Display coverage report
35+
- `python -m coverage html` - Generate HTML coverage report
36+
37+
### Test Structure
38+
The project includes comprehensive unit tests:
39+
- `tests/` directory contains all test files
40+
- Test files follow the `test_*.py` naming convention
41+
- Uses standard unittest.TestCase classes for test organization
42+
43+
### Development Workflow
44+
1. Install development dependencies: `pip install -r requirements-dev.txt`
45+
2. Run all tests: `python -m unittest discover tests`
46+
3. Run tests with coverage: `python -m coverage run -m unittest discover tests`
47+
4. Check coverage report: `python -m coverage report`
48+
5. Fix any failing tests before committing
49+
2450
## Permissions
2551
Claude requires the following Bash tool permissions:
2652
- `pip` commands for dependency installation
27-
- `python` commands for running type checkers
53+
- `python` commands for running type checkers and unit tests
2854
- `mypy` commands for static type analysis

0 commit comments

Comments
 (0)