diff --git a/pyproject.toml b/pyproject.toml index 7d2a763..07b5c26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ build-backend = "hatchling.build" [tool.hatch.build] packages = ["trushell"] -include = ["README.md", "LICENSE", "trushell/sounds/*"] +include = ["README.md", "LICENSE", "trushell/sounds/*", "trushell/config/*"] [tool.ruff] line-length = 88 diff --git a/tests/test_help_docs.py b/tests/test_help_docs.py index 879d198..c419629 100644 --- a/tests/test_help_docs.py +++ b/tests/test_help_docs.py @@ -1,18 +1,24 @@ from __future__ import annotations +import importlib from types import SimpleNamespace from trushell.commands.core import run_help def test_run_help_prints_docstring_for_known_command(monkeypatch, capsys): + def _fake_import_module(path: str): + module = importlib.import_module(path.replace("/", ".").removesuffix(".py")) + return module + fake_kernel = SimpleNamespace( registry={ "settings": { "path": "trushell/commands/settings.py", "function": "run_settings", } - } + }, + _import_module=_fake_import_module, ) # Provide a minimal module object with the expected function and