Skip to content

Commit 39d6423

Browse files
Mjboothausoz-agent
andcommitted
docs: clarify README what, why, and how
Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 669205b commit 39d6423

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
# pytest-just
22
A pytest plugin for testing justfiles.
3+
## What is pytest-just?
4+
`pytest-just` is a plugin that adds a session-scoped `just` fixture to pytest so you can test `justfile` contracts directly in your test suite.
35

4-
## Status
5-
Early-stage project scaffold based on `SPEC.md`.
6+
It is designed for assertions about recipe structure and intent, including:
67

7-
## Goals
8-
- Test recipe existence, dependencies, parameters, and body content.
9-
- Validate variable threading using `just --dump --dump-format json`.
10-
- Support safe smoke checks with `just --dry-run`.
8+
- recipe existence
9+
- dependency relationships
10+
- parameter contracts
11+
- rendered body content
12+
- alias and assignment mapping
13+
14+
## Why use pytest-just?
15+
As projects grow, `justfile` automation often becomes critical but under-tested. Small recipe changes can quietly break CI, local developer workflows, or release steps.
16+
17+
`pytest-just` helps by making contract checks:
18+
19+
- fast
20+
- repeatable
21+
- easy to run in CI
22+
- explicit in code review
23+
24+
This catches automation drift early without requiring full end-to-end execution of every command.
1125

1226
## Tooling
1327
- Package and commands: `uv`
@@ -20,14 +34,13 @@ Early-stage project scaffold based on `SPEC.md`.
2034
uv sync
2135
uv run pytest
2236
```
23-
## How it works
24-
`pytest-just` does not execute recipes directly. Instead, it asks `just` for structured metadata and rendered recipe text:
37+
## How does pytest-just work?
38+
`pytest-just` primarily validates recipe contracts instead of running full recipe side effects. It asks `just` for structured metadata and rendered recipe text:
2539

2640
- `just --dump --dump-format json` for recipe graph, parameters, attributes, aliases, and assignments
2741
- `just --show <recipe>` for rendered body text checks
2842
- `just --dry-run <recipe>` for safe command smoke checks
29-
30-
This keeps tests fast and side-effect free while still validating justfile contracts.
43+
This keeps tests fast and mostly side-effect free while still validating real justfile behaviour.
3144

3245
## Plugin behaviour
3346
The plugin registers:

0 commit comments

Comments
 (0)