Skip to main content

Pytest plugin that applies @beartype to every collected test function.

Project description

A tiny pytest plugin that applies beartype to every collected test function, giving you runtime type-checking of test signatures and any locally-typed variables inside the test body.

This is distinct from pytest-beartype, which beartypes your source packages. This plugin beartypes the tests themselves.

Install

uv add --dev pytest-beartype-tests

The plugin auto-registers via the pytest11 entry point — there is no configuration.

What it does

Equivalent to writing this hook in your conftest.py:

import pytest
from beartype import beartype


def pytest_collection_modifyitems(items: list[pytest.Function]) -> None:
    for item in items:
        item.obj = beartype(obj=item.obj)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_beartype_tests-2026.4.26.tar.gz (88.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_beartype_tests-2026.4.26-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pytest_beartype_tests-2026.4.26.tar.gz.

File metadata

File hashes

Hashes for pytest_beartype_tests-2026.4.26.tar.gz
Algorithm Hash digest
SHA256 a986f59466243b616606279b3c6c00e7e171ee0b5aad4702922ea20fd1a1b52c
MD5 96163bdf32009ec87458c71cc3b8693c
BLAKE2b-256 e64f14167cd06fa425dc70eb486942e5ef402c738984726703584bba55353809

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_beartype_tests-2026.4.26.tar.gz:

Publisher: release.yml on adamtheturtle/pytest-beartype-tests

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_beartype_tests-2026.4.26-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_beartype_tests-2026.4.26-py3-none-any.whl
Algorithm Hash digest
SHA256 e0c19a6708a14e4f97acb18ec94151550d70f736733b36d6cd621a6481cea99d
MD5 bbc57836c46fb13001d577c0a58a920d
BLAKE2b-256 6b2bb9c1799582a00a9746f875deecd4449d0dc30254600c77231837bb67c6ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_beartype_tests-2026.4.26-py3-none-any.whl:

Publisher: release.yml on adamtheturtle/pytest-beartype-tests

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page