Commit e88921b
committed
docs(CLAUDE): Add critical warnings about Server() in doctests
Document the dangerous pattern where creating Server() directly in
doctests causes the user's tmux session to be killed:
1. conftest.py:44 overwrites Server with TestServer factory
2. TestServer tracks ALL created servers via on_init callback
3. TestServer finalizer kills ALL tracked servers at test suite end
4. socket_name="default" → kills user's actual tmux session!
Added warnings in two sections:
- Doctest Integration: Explains the root cause and safe patterns
- Writing Tests: Quick reference for test authors
This prevents the critical bug where running `uv run pytest` from
inside tmux would kill the user's session.1 parent 245da21 commit e88921b
1 file changed
+29
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
206 | 233 | | |
207 | 234 | | |
208 | 235 | | |
| |||
291 | 318 | | |
292 | 319 | | |
293 | 320 | | |
| 321 | + | |
| 322 | + | |
294 | 323 | | |
295 | 324 | | |
296 | 325 | | |
| |||
0 commit comments