tests.test_manager_mise moduleΒΆ

mise output-parsing and CLI-construction tests.

These tests stub run_cli and exercise the pure-Python branches of the Mise manager. They do not invoke the real mise binary.

tests.test_manager_mise.manager()[source]ΒΆ
tests.test_manager_mise.test_installed_yields_packages(manager, stub_run_cli)[source]ΒΆ
tests.test_manager_mise.test_installed_handles_empty(manager, stub_run_cli, output)[source]ΒΆ
tests.test_manager_mise.test_installed_yields_one_package_per_version(manager, stub_run_cli)[source]ΒΆ
tests.test_manager_mise.test_installed_preserves_backend_prefix(manager, stub_run_cli)[source]ΒΆ

Backend-prefixed IDs like pipx:ruff round-trip without rewriting.

tests.test_manager_mise.test_outdated_yields_upgrades(manager, stub_run_cli)[source]ΒΆ
tests.test_manager_mise.test_outdated_handles_empty(manager, stub_run_cli, output)[source]ΒΆ
tests.test_manager_mise.test_outdated_skips_a_lazy_tool_that_is_not_installed(manager, stub_run_cli)[source]ΒΆ

A null current version marks a tool mise has not installed.

The amp entry is verbatim from the mise outdated --json of mise 2026.11.0 on Omarchy 4.5.0, where amp is a lazy tool nobody ran yet. The node entry is the installed tool of test_outdated_yields_upgrades.

tests.test_manager_mise.test_search_parses_table(manager, stub_run_cli)[source]ΒΆ
tests.test_manager_mise.test_search_keeps_descriptions_with_inner_spaces(manager, stub_run_cli)[source]ΒΆ

A description with single-space-separated words is preserved intact.

The regex only treats the run of 2+ spaces between columns as a delimiter.

tests.test_manager_mise.test_install_builds_spec(manager, capture_run_cli, version, expected_spec)[source]ΒΆ
tests.test_manager_mise.test_upgrade_all_cli_omits_target(manager)[source]ΒΆ
tests.test_manager_mise.test_upgrade_one_cli_builds_spec(manager, version, expected_spec)[source]ΒΆ
tests.test_manager_mise.test_operation_command(manager, capture_run_cli, operation, args, expected)[source]ΒΆ
tests.test_manager_mise.mise_shims(tmp_path)[source]ΒΆ

A stand-in mise binary and a directory of shims that point at it.

The stand-in answers mise which mango alone, as mise does for an installed tool. Returns the shims directory, which holds mango, papaya and a symlink named mise.

tests.test_manager_mise.test_search_all_cli_skips_mise_shim_of_missing_tool(tmp_path, mise_shims)[source]ΒΆ

Running such a shim installs its tool, so a later real binary wins.

The shim of an installed tool stays, and so does mise under another path.

The stand-in exits 1 for mise which mise, so the second case passes only while no probe runs for a symlink named after the binary.

tests.test_manager_mise.test_search_all_cli_keeps_mise_shim_when_probe_cannot_run(tmp_path)[source]ΒΆ

A mise that cannot be spawned leaves the shim as usable as before.

tests.test_manager_mise.test_mise_owns_its_shims()[source]ΒΆ

search_all_cli asks mise about each candidate, as mise defines the hook.