Skip to content

Index

provide.testkit

Provide TestKit.

Unified testing utilities for the provide ecosystem with automatic context detection. Comprehensive fixtures and utilities for testing Foundation-based applications.

Note: Testing information is displayed via pytest hooks in conftest.py

Functions

__getattr__

__getattr__(name: str) -> Any

Lazy import testing utilities only when accessed.

Source code in provide/testkit/__init__.py
def __getattr__(name: str) -> Any:
    """Lazy import testing utilities only when accessed."""
    # Check if it's a direct submodule
    if name in _DIRECT_SUBMODULES:
        import importlib

        return importlib.import_module(f"provide.testkit.{name}")

    # Find which module contains this attribute
    module_path = _find_attribute_module(name)
    if module_path:
        return _import_from_module(module_path, name)

    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")