Skip to content

Commit e18198b

Browse files
committed
cursor(rules[dev-loop]) add pytest-watcher commands for continuous testing
1 parent a4acdc2 commit e18198b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.cursor/rules/dev-loop.mdc

+19
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ Verify that your changes pass the tests:
2121
uv run py.test
2222
```
2323

24+
For continuous testing during development, use pytest-watcher:
25+
26+
```
27+
# Watch all tests
28+
uv run ptw .
29+
30+
# Watch and run tests immediately, including doctests
31+
uv run ptw . --now --doctest-modules
32+
33+
# Watch specific files or directories
34+
uv run ptw . --now --doctest-modules src/libtmux/_internal/
35+
```
36+
2437
## 3. Commit Initial Changes
2538

2639
Make an atomic commit for your changes using conventional commits.
@@ -126,3 +139,9 @@ For doctests in `src/**/*.py` files:
126139
4. **Keep doctests simple and focused** on demonstrating usage rather than comprehensive testing.
127140

128141
5. **Add blank lines between test sections** for improved readability.
142+
143+
6. **Test your doctests continuously** using pytest-watcher during development:
144+
```
145+
# Watch specific modules for doctest changes
146+
uv run ptw . --now --doctest-modules src/path/to/module.py
147+
```

0 commit comments

Comments
 (0)