Skip to main content

pytest-intent

The @intent decorator for pytest - links a test function to one or more CSD intent claims.

Published on PyPI as csd-pytest-intent - the bare name pytest-intent belongs to an unrelated plugin there. The import name is pytest_intent either way.

CSD (Cognitive Software Delivery) is a language-agnostic methodology. This package is one specific implementation, scoped to Python projects using pytest.

What this package is

A tiny library (~40 LOC) that exposes a single decorator:

from pytest_intent import intent

@intent("INT-001")
def test_resource_ids_unique(data_dir):
    ...

@intent("INT-021", "INT-022")  # one test serves two claims
def test_referential_integrity(data_dir):
    ...

That's the entire public surface.

What it is NOT

  • Not a validator. Schema checks (CSD-INTENT-01), orphan detection (test references unknown claim), and cross-runtime coverage all live in the standalone csd-intent CLI - point it at any project to audit.
  • Not a pytest plugin. Just a decorator. No fixtures, no entry points, no autoloading. Drop the import in your tests and you're done.
  • Not a generator. You write your tests; this annotates them.

Why split the decorator from the auditor?

  • One concern per package. The decorator runs inside pytest; the auditor is cross-language and runs standalone (CI step, pre-commit, ad-hoc).
  • No coupling. Other test runners (vitest-intent, playwright-intent) expose the same intent() marker shape. The auditor reads all of them, regardless of which decorator package put the marker there.
  • Tiny install. pytest-intent has no dependency on PyYAML or anything beyond pytest. The auditor pulls those in only when you actually need to audit.

Install

# From PyPI (the distribution is csd-pytest-intent; the import stays pytest_intent):
pip install csd-pytest-intent

# Local dev against a csd-library checkout:
pip install -e path/to/csd-library/pytest-intent

Companion: csd-intent

To validate your intent.yaml against CSD-INTENT-01 and check that every claim has a test:

pip install csd-intent
csd-intent /path/to/your/project

See csd-intent README for full options.

License

MIT.

Metadata

Release files for csd-pytest-intent 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csd-pytest-intent 0.3.1
File Size Uploaded Provenance Actions
csd_pytest_intent-0.3.1.tar.gz 5.0 kB With provenance Details for csd_pytest_intent-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for csd-pytest-intent 0.3.1
File Interpreter ABI Platform Actions
csd_pytest_intent-0.3.1-py3-none-any.whl Python 3 none any Details for csd_pytest_intent-0.3.1-py3-none-any.whl

Total release size: 10.1 kB

Release files / csd_pytest_intent-0.3.1.tar.gz

Download URL csd_pytest_intent-0.3.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0d1d2864ebf7e67cef116cd05d369272c58e8b79c8991df23377bc8b91bded26
BLAKE2b-256 checksum
How to use checksums
bcc08fb3c7d76b0ba66309dd31763eac5cae6f70672cd3c44f3a59bd9596324e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / csd_pytest_intent-0.3.1-py3-none-any.whl

Download URL csd_pytest_intent-0.3.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0a979db29f17a6d8b08e3c03a16a0d43826736489982bbc0bb4e48df4f47195
BLAKE2b-256 checksum
How to use checksums
768171faa5e9a99dc70caf455dc236f1ddf2798d3379dcef507e281144b832e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Security for csd-pytest-intent 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for csd_pytest_intent-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page