Skip to content

Commit 01592d8

Browse files
kgilpinclaude
andcommitted
docs: Add CLAUDE.md with test running instructions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f9945dc commit 01592d8

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# appmap-python
2+
3+
Python agent for AppMap. Records function calls, HTTP requests, SQL queries, parameters, return values, and exceptions into `.appmap.json` files.
4+
5+
## Running tests
6+
7+
Tests must be run via `tox` or the `appmap-python` wrapper, not bare `pytest`. The wrapper sets `APPMAP=true`, which is required for conditional imports in `appmap/__init__.py` (e.g. `generation`). Subprocess-based tests also need the `appmap-python` script in PATH.
8+
9+
```sh
10+
# Correct - via tox (how CI runs them)
11+
tox
12+
13+
# Correct - via appmap-python wrapper
14+
appmap-python pytest
15+
16+
# Also works for quick local iteration on non-subprocess tests
17+
APPMAP=true .venv/bin/python -m pytest _appmap/test/test_events.py
18+
19+
# WRONG - will fail on subprocess tests
20+
pytest
21+
```
22+
23+
## Project structure
24+
25+
- `appmap/` - Public package entry point (conditional imports based on APPMAP env var)
26+
- `_appmap/` - Internal implementation (event recording, instrumentation, web framework integration)
27+
- `_appmap/test/` - Test suite
28+
- `_appmap/test/data/` - Test fixtures and expected appmap JSON files

0 commit comments

Comments
 (0)