Minimal
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
provide.testkit.base.minimal
¶
MinimalTestCase Base Class.
Provides a lightweight base class for tests that need common utilities but don't require Foundation state reset. Ideal for timing-sensitive tests or tests that don't use Foundation components.
Classes¶
MinimalTestCase
¶
Minimal test case base class without Foundation reset overhead.
Provides common test utilities without the heavyweight Foundation reset: - Temporary file/directory tracking and cleanup - Mock tracking utilities - Common assertion methods - Output capture helpers
Use this for timing-sensitive tests or tests that don't need Foundation state isolation.
Functions¶
assert_contains_error
¶
assert_contains_error(
output: str,
error_type: type[Exception],
message: str | None = None,
) -> None
Assert that output contains an error of the specified type.
Source code in provide/testkit/base/minimal.py
assert_dir_exists
¶
Assert that a directory exists.
Source code in provide/testkit/base/minimal.py
assert_file_exists
¶
Assert that a file exists.
Source code in provide/testkit/base/minimal.py
assert_json_output
¶
Assert that output is valid JSON matching expected values.
Source code in provide/testkit/base/minimal.py
assert_log_contains
¶
Assert that captured logs contain a message at the specified level.
Source code in provide/testkit/base/minimal.py
assert_output_contains
¶
Assert that output contains expected string.
assert_output_not_contains
¶
Assert that output does not contain unexpected string.
create_temp_dir
¶
Create a temporary directory that will be cleaned up.
create_temp_file
¶
Create a temporary file that will be cleaned up.
Source code in provide/testkit/base/minimal.py
setup_method
¶
teardown_method
¶
Clean up test case.