TestRegistry ============ Test case registry for discovering and managing test cases. Test cases are registered via the @register_test decorator or by calling TestRegistry.register() directly. Classes ------- .. py:class:: TestRegistry Registry of available test cases. Test cases register themselves using the @register_test decorator or by calling TestRegistry.register() directly. Example: @register_test(category="algorithm") class TestAlgorithmWatershed(TestCase): name = "algorithm_watershed" description = "Test watershed algorithm" ... # Or manually: TestRegistry.register(TestAlgorithmWatershed) **Methods:** .. py:method:: register() Register a test case class. .. py:method:: unregister() Unregister a test case by name. .. py:method:: get() Get a test case by name. .. py:method:: list_tests() List all registered test cases. .. py:method:: list_categories() List all unique categories. .. py:method:: clear() Clear all registered tests. Mainly for testing. Functions --------- .. py:function:: register() Register a test case class. Args: test_cls: TestCase subclass to register. category: Optional category override. .. py:function:: unregister() Unregister a test case by name. Args: name: Name of test to unregister. Returns: True if test was found and removed. .. py:function:: get() Get a test case by name. Args: name: Name of test to get. Returns: TestCaseInfo or None if not found. .. py:function:: list_tests() List all registered test cases. Args: category: Optional category filter. Returns: List of TestCaseInfo objects. .. py:function:: list_categories() List all unique categories. Returns: Sorted list of category names. .. py:function:: clear() Clear all registered tests. Mainly for testing. .. py:function:: register_test() Decorator to register a test case class. Usage: @register_test(category="algorithm") class TestAlgorithmWatershed(TestCase): name = "algorithm_watershed" description = "Test watershed algorithm" ... Args: category: Test category for filtering. Returns: Class decorator that registers the test. .. py:function:: decorator()