Example Discovery
Functions to discover and extract test example functions:
ExampleInfo
def ExampleInfo(
name:str, module_name:str, feature:str, function:Any, source:str, docstring:str
)->None:
Information about a discovered test example function.
get_example_pattern
def get_example_pattern(
module_name:str
):
Call self as a function.
extract_test_examples_from_module
def extract_test_examples_from_module(
module:Any, # The module to extract test examples from
module_name:str, # The name of the module
)->List: # List of ExampleInfo objects
Extract all test example functions from a module.
list_all_examples
def list_all_examples(
)->Dict: # Dictionary mapping module names to their examples
List all test example functions across all utility modules.
list_module_examples
def list_module_examples(
module_name:str, # Name of the module to inspect
)->List: # List of ExampleInfo objects
List all test example functions in a specific utility module.
get_example_by_name
def get_example_by_name(
module_name:str, # Name of the module
feature:str, # Feature name (e.g., 'basic', 'directional')
)->Optional: # ExampleInfo object or None if not found
Get a specific example by module name and feature.