Skip to content

Commit 89d60b9

Browse files
committed
Update README, docs
1 parent d65f996 commit 89d60b9

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ Example:
3333
### Why not general tools
3434

3535
- Easy to use and remember
36-
- Works for most python projects out of the box
36+
- Works for most Python projects out of the box
3737
- Uses native system monitoring API instead of polling on supported systems (see [watchdog documentation](https://python-watchdog.readthedocs.io/en/stable/installation.html#supported-platforms-and-caveats))
3838
- Listens for new file, delete file, change and move events
3939
- Runs your tests with latest changes in case of post-processing events (see [delay](#delay))
40+
- Has interactive mode with handy keyboard shortcuts
4041

4142
### What about pytest-watch
4243

docs/index.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ Example:
1919
### Why not general tools
2020

2121
- Easy to use and remember
22-
- Works for most python projects out of the box
22+
- Works for most Python projects out of the box
2323
- Uses native system monitoring API instead of polling on supported systems (see [watchdog documentation](https://python-watchdog.readthedocs.io/en/stable/installation.html#supported-platforms-and-caveats))
2424
- Listens for new file, delete file, change and move events
2525
- Runs your tests with latest changes in case of post-processing events (see [delay](#delay))
26+
- Has interactive mode with handy keyboard shortcuts
2627

2728
### What about pytest-watch
2829

@@ -103,23 +104,35 @@ ptw . --ignore-patterns 'settings.py,db.py'
103104

104105
You can control the actual delay value with the `--delay` flag:
105106

106-
`ptw . --delay 0.2`
107+
```sh
108+
ptw . --delay 0.2
109+
```
107110

108111
To disable the delay altogether, you can set zero as a value:
109112

110-
`ptw . --delay 0`
113+
```sh
114+
ptw . --delay 0
115+
```
116+
117+
### Screen clearing
118+
119+
Use the `--clear` flag to clear the terminal screen before each test run
120+
121+
```sh
122+
ptw . --clear
123+
```
111124

112125
### Differences with `pytest-watch`
113126

114127
Even though this project was inspired by [`pytest-watch`](https://github.com/joeyespo/pytest-watch), it's not a fork of it. Therefore, there are **differences** in behavior:
115128

116-
- `pytest-watch` needs you to specify a path to watch as a first argument:
129+
- `pytest-watcher` needs you to specify a path to watch as a first argument:
117130

118-
```
131+
```sh
119132
ptw .
120133
```
121134

122-
- `pytest-watch` doesn't start tests immediately by default. You can customize this behavior using `--now` flag.
135+
- `pytest-watcher` doesn't start tests immediately by default. You can customize this behavior using `--now` flag.
123136

124137
## Configuring
125138

@@ -128,6 +141,7 @@ You can configure `pytest-watcher` via `pyproject.toml` file. Here is the defaul
128141
```toml
129142
[tool.pytest-watcher]
130143
now = false
144+
clear = true
131145
delay = 0.2
132146
runner = "pytest"
133147
runner_args = []

0 commit comments

Comments
 (0)