hbutils.testing.capture

Utilities for capturing program exit behavior and output streams in tests.

This module provides a convenient namespace that re-exports capture utilities implemented in the hbutils.testing.capture.exit and hbutils.testing.capture.output submodules. These tools are typically used in unit tests to intercept system exits or capture stdout/stderr streams without affecting the surrounding test environment.

The module exposes the public APIs from its submodules, including:

Example:

>>> from hbutils.testing.capture import capture_exit, capture_output  
>>> # Use capture_exit in a test to intercept sys.exit()
>>> # Use capture_output in a test to capture printed output

Note

The exact functions and classes provided by this module depend on the public API of the re-exported submodules.