Skip to content

Foundation

provide.testkit.base.foundation

FoundationTestCase Base Class.

Provides a common base class for all Foundation-based tests with standard utilities, automatic setup/cleanup, and common assertions.

Classes

FoundationTestCase

Bases: MinimalTestCase

Base test case for Foundation-based tests.

Provides common utilities for testing Foundation applications: - Automatic Foundation reset between tests - Temporary file/directory tracking and cleanup - Mock tracking utilities - Common assertion methods - Output capture helpers

Functions
setup_method
setup_method() -> None

Set up test case with Foundation reset.

Source code in provide/testkit/base/foundation.py
def setup_method(self) -> None:
    """Set up test case with Foundation reset."""
    # Check if this test/class is marked as timing_sensitive
    if self._needs_full_reset():
        reset_foundation_setup_for_testing()
    else:
        # For timing-sensitive tests, do minimal reset to prevent test interference
        # but avoid full setup that could affect timing
        self._minimal_state_reset()

    # Always call parent setup for basic utilities
    super().setup_method()

Functions