Skip to main content

pytest-bods-fixtures

A pytest plugin that exposes the canonical bods-fixtures pack as a single auto-parametrized fixture, so adapter test suites can run their pipeline against every BODS v0.4 conformance case with one line of test code.

Why

If you write a tool that ingests, transforms, or emits Beneficial Ownership Data Standard statements, you want to know it handles the full shape of the standard — not just the happy path. The bods-fixtures pack provides that coverage (direct ownership, chains, circular ownership, joint control, declared-unknown UBOs, etc.). This plugin removes the parametrize boilerplate so you can drop the fixture into any test file and get one test per case.

Install

pip install pytest-bods-v04-fixtures

The bods-v04-fixtures data pack is pulled in as a dependency. The PyPI distribution is pytest-bods-v04-fixtures — the version-explicit name matches the data pack it parametrizes over and leaves the generic pytest-bods-fixtures name available for any future ecosystem-wide tooling. The pytest fixture name (bods_fixture) and Python import path (pytest_bods_fixtures) are unchanged.

Use

def test_my_adapter_does_not_raise(bods_fixture):
    MyAdapter().convert(bods_fixture.statements)

That's it. The test will run once per fixture in the pack. Failures show the fixture name in the test ID, so the offending case is obvious:

FAILED tests/test_adapter.py::test_my_adapter_does_not_raise[core/05-circular-ownership]

The bods_fixture parameter is a bods_fixtures.Fixture object exposing the same helper API the data pack ships:

def test_pipeline_emits_one_party_per_entity(bods_fixture):
    entities = bods_fixture.by_record_type("entity")
    persons = bods_fixture.by_record_type("person")
    output = MyAdapter().convert(bods_fixture.statements)
    assert len(output.parties) == len(entities) + len(persons)

Targeting specific cases

bods_fixture runs over every case. To target a subset, use pytest's standard -k selector:

pytest -k "circular-ownership"

Or write your own narrowly-scoped tests using bods_fixtures.load(name) directly:

from bods_fixtures import load

def test_anonymous_owner_is_not_silently_dropped():
    fixture = load("core/04-anonymous-interested-party")
    output = MyAdapter().convert(fixture.statements)
    # adapter-specific assertions about the FATF-relevant signal

Versioning

pytest-bods-v04-fixtures pins to a bods-v04-fixtures major version. Upgrading to a new minor of the data pack (which may add fixtures) just adds new test cases to your suite. Upgrading to a new major (which may change fixture shape) requires a new major of this plugin.

License

MIT — see LICENSE.

Metadata

Release files for pytest-bods-v04-fixtures 0.1.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 pytest-bods-v04-fixtures 0.1.1
File Size Uploaded Provenance
pytest_bods_v04_fixtures-0.1.1.tar.gz 5.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-bods-v04-fixtures 0.1.1
File Interpreter ABI Platform
pytest_bods_v04_fixtures-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / pytest_bods_v04_fixtures-0.1.1.tar.gz

Download URL pytest_bods_v04_fixtures-0.1.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5a1a497b1ef5605ea7eeaf49a79b6e046c014f5edb95cf63e64c915a17c9d575
BLAKE2b-256 checksum
How to use checksums
a9b89ae1d4946e81fcd0fff33aa4dfd7d1e9f808ee239920ba41a650fc5dd3f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 20, 2026.

Transparency log

Release files / pytest_bods_v04_fixtures-0.1.1-py3-none-any.whl

Download URL pytest_bods_v04_fixtures-0.1.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d407de3080c03d27c6900cd6f6e2d7b9232d3ad4847ed15a2c2d408a19db9dc4
BLAKE2b-256 checksum
How to use checksums
06b45023f0444ae7281f282e348336d4609138fc36f8afccb73c051c22c56ec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 20, 2026.

Transparency log

Security for pytest-bods-v04-fixtures 0.1.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 pytest_bods_v04_fixtures-0.1.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 Apr 20, 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.

Release history Release notifications | RSS feed

This release

0.1.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