A small, standalone sample project that runs Markdown specs as tests with
Vár, using the pytest-var plugin. Copy it as the
starting point for your own project.
The .md files at the project root are the specs — they run as tests.
uv run pytestEach example in the Markdown specs becomes one pytest test. No conftest.py
and no test files are needed — installing pytest-var is the entire
integration.
var.config.jsonis the single source of truth:docs.includeglobs the Markdown specs andstepsglobs the step-definition files.steps/*.steps.pydefine the steps withsteps+@stimulus/@sensor. A stimulus returns the next state, a sensor returns a value for Vár to compare against what the Markdown says.src/yahtzee_example/is the sample's domain code — an ordinary installable package the steps import, just like your production code.
In the oselvar/var monorepo this sample
resolves the Vár packages from [tool.uv.sources] path sources, gating
trunk against the local build. The release sync to
oselvar/var-examples deletes
that table and pins the released PyPI version — there, the plain
pytest-var dependency is all a real project needs.