Skip to content

Commit 2b304e8

Browse files
Add local testing environment setup to CLAUDE.md
- Add required AWS environment variables for local testing - Emphasize mandatory lint check before running tests - Include step-by-step instructions for local test execution - Highlight critical requirement to run 'make chk' first 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6b48a8a commit 2b304e8

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,27 @@ def method_name(self, param1: str, param2: Optional[int] = None) -> List[str]:
119119
2. **Integration Tests**: Test actual AWS Athena interactions when modifying query execution logic
120120
3. **SQLAlchemy Compliance**: Ensure SQLAlchemy dialect tests pass when modifying dialect code
121121
4. **Mock AWS Services**: Use `moto` or similar for testing AWS interactions without real resources
122+
5. **LINT First**: **ALWAYS** run `make chk` before running tests - ensure code passes all quality checks first
123+
124+
#### Local Testing Environment
125+
To run tests locally, you need to set the following environment variables:
126+
127+
```bash
128+
export AWS_DEFAULT_REGION=us-west-2
129+
export AWS_ATHENA_S3_STAGING_DIR=s3://your-staging-bucket/path/
130+
export AWS_ATHENA_WORKGROUP=primary
131+
export AWS_ATHENA_SPARK_WORKGROUP=spark-primary
132+
```
133+
134+
**CRITICAL: Pre-test Requirements**
135+
```bash
136+
# ALWAYS run quality checks first - tests will fail if code doesn't pass lint
137+
make chk
138+
139+
# Only after lint passes, install dependencies and run tests
140+
uv sync
141+
uv run pytest tests/pyathena/test_file.py -v
142+
```
122143

123144
#### Writing Tests
124145
- Place tests in `tests/pyathena/` mirroring the source structure

0 commit comments

Comments
 (0)