test_python_module.py 729 B

1234567891011121314151617181920
  1. """Tests for the Python template module."""
  2. from __future__ import annotations
  3. import cli.modules.python # noqa: F401 - import registers the module
  4. from cli.core.registry import registry
  5. from cli.modules.python import PythonModule
  6. def test_python_module_metadata() -> None:
  7. """The Python module should expose the expected CLI metadata."""
  8. assert PythonModule.name == "python"
  9. assert PythonModule.description == "Manage Python project and automation templates"
  10. def test_python_module_registers_with_registry() -> None:
  11. """Importing the module should make the Python kind discoverable."""
  12. registered_modules = dict(registry.iter_module_classes())
  13. assert registered_modules["python"] is PythonModule