tests.test_cli_managers module¶

tests.test_cli_managers.subcmd()[source]¶
tests.test_cli_managers.evaluate_signals(mid, stdout, stderr)[source]¶
tests.test_cli_managers.check_selection(result, selected=('am', 'antidote', 'antigen', 'antigravity-cli-plugins', 'apk', 'app-manager', 'apt', 'apt-mint', 'aptitude', 'asdf', 'aura', 'basalt', 'bin', 'bob', 'bpkg', 'brew', 'bun', 'cargo', 'choosenim', 'claude-code-plugins', 'clib', 'composer', 'conda', 'cpan', 'cran', 'deb-get', 'dkp-pacman', 'dnf', 'dnf5', 'dotnet', 'elan', 'emacs', 'emerge', 'eopkg', 'fisher', 'flatpak', 'fwupd', 'gcloud', 'gem', 'getnf', 'gext', 'gh-ext', 'ghcup', 'go', 'guix', 'gup', 'haxelib', 'hyprpm', 'jpm', 'julia', 'juliaup', 'krew', 'lazy', 'luarocks', 'lure', 'mamba', 'mason', 'micro', 'microdnf', 'micromamba', 'miktex', 'mise', 'nala', 'nimble', 'nix', 'npm', 'octave', 'oh-my-fish', 'ollama', 'opam', 'opkg', 'pacman', 'pacstall', 'pamac', 'paru', 'pear', 'pearl', 'pi', 'pikaur', 'pip', 'pipx', 'pipxu', 'pixi', 'pkcon', 'pkgit', 'pkgm', 'platformio-core', 'pmerge', 'pnpm', 'protonplus', 'pwsh-gallery', 'pyenv', 'raco', 'roswell', 'rpm-ostree', 'rustup', 'sdkman', 'sheldon', 'skills', 'snap', 'soar', 'spack', 'steamcmd', 'stew', 'tlmgr', 'topgrade', 'trizen', 'uv', 'uvx', 'vagrant', 'vcpkg', 'vim-pack', 'vscode', 'vscodium', 'whalebrew', 'xbps', 'yarn', 'yarn-berry', 'yay', 'yazi', 'yum', 'zef', 'zerobrew', 'zeroinstall', 'zim', 'zinit', 'zplug', 'zvm', 'zypper'), reference_set=('am', 'antidote', 'antigen', 'antigravity-cli-plugins', 'apk', 'app-manager', 'apt', 'apt-mint', 'aptitude', 'asdf', 'aura', 'basalt', 'bin', 'bob', 'bpkg', 'brew', 'bun', 'cargo', 'choosenim', 'claude-code-plugins', 'clib', 'composer', 'conda', 'cpan', 'cran', 'deb-get', 'dkp-pacman', 'dnf', 'dnf5', 'dotnet', 'elan', 'emacs', 'emerge', 'eopkg', 'fisher', 'flatpak', 'fwupd', 'gcloud', 'gem', 'getnf', 'gext', 'gh-ext', 'ghcup', 'go', 'guix', 'gup', 'haxelib', 'hyprpm', 'jpm', 'julia', 'juliaup', 'krew', 'lazy', 'luarocks', 'lure', 'mamba', 'mason', 'micro', 'microdnf', 'micromamba', 'miktex', 'mise', 'nala', 'nimble', 'nix', 'npm', 'octave', 'oh-my-fish', 'ollama', 'opam', 'opkg', 'pacman', 'pacstall', 'pamac', 'paru', 'pear', 'pearl', 'pi', 'pikaur', 'pip', 'pipx', 'pipxu', 'pixi', 'pkcon', 'pkgit', 'pkgm', 'platformio-core', 'pmerge', 'pnpm', 'protonplus', 'pwsh-gallery', 'pyenv', 'raco', 'roswell', 'rpm-ostree', 'rustup', 'sdkman', 'sheldon', 'skills', 'snap', 'soar', 'spack', 'steamcmd', 'stew', 'tlmgr', 'topgrade', 'trizen', 'uv', 'uvx', 'vagrant', 'vcpkg', 'vim-pack', 'vscode', 'vscodium', 'whalebrew', 'xbps', 'yarn', 'yarn-berry', 'yay', 'yazi', 'yum', 'zef', 'zerobrew', 'zeroinstall', 'zim', 'zinit', 'zplug', 'zvm', 'zypper'), strict_selection_match=True, *, signals=<function evaluate_signals>)¶

Selection assertions reading this subcommand’s own signals.

class tests.test_cli_managers.TestManagers[source]¶

Bases: CLITableTests

columns_registry: tuple = ((ColumnSpec(id='manager_id', label='Manager ID', description="Manager's identifier.", max_width=None, optional=False, sortable=True), SortableField.MANAGER_ID), (ColumnSpec(id='manager_name', label='Name', description="Manager's common name.", max_width=None, optional=False, sortable=True), SortableField.MANAGER_NAME), (ColumnSpec(id='supported', label='Supported', description='Support status on the current platform.', max_width='auto', optional=False, sortable=True), None), (ColumnSpec(id='cli', label='CLI', description="Location of the manager's binary on the system.", max_width='auto', optional=False, sortable=True), None), (ColumnSpec(id='executable', label='Executable', description='Whether the binary is executable.', max_width=None, optional=False, sortable=True), None), (ColumnSpec(id='version', label='Version', description="Manager's self-reported version, and the unsatisfied requirement when stale.", max_width=None, optional=False, sortable=True), SortableField.VERSION))¶

The subcommand’s column registry (a tables.py *_COLUMNS constant).

Set by each subclass so the generic --columns tests below resolve column IDs to their header labels from the same source of truth the CLI uses.

columns_test_pair: tuple[str, str] = ('manager_id', 'version')¶

Two column IDs, guaranteed by the subcommand’s registry, that the generic projection test selects in this order. Overridden by subclasses whose registry has no package columns.

test_all_managers(invoke, subcmd, manager_id)[source]¶

Check only the selected manager is listed.

test_unsupported_managers(invoke, subcmd, manager_id)[source]¶

A manager named by the user is reported whatever its state.

The default view widens to supported on an explicit selection, so the row spelling out why mpm cannot use it is the answer the selector asked for.

test_view_widths(invoke, subcmd, view_args, expected_ids)[source]¶

Each view reports its own nested slice of the pool.

test_all_managers_flag_selects_widest_view(invoke, subcmd)[source]¶

The global flag keeps naming the widest view, as --view all does.

test_default_view_drops_constant_columns(invoke, subcmd)[source]¶

The default view leaves out Supported and Executable.

Both are a âś“ on every detected row. The wider views bring them back.

test_json_parsing(invoke, subcmd)[source]¶
tests.test_cli_managers.test_managers_stamps_global_timeout(invoke)[source]¶

The managers subcommand forwards the global --timeout to the pool.

The version probes behind the table’s detection columns fire in the pool’s warm-up round, right after selection, so the pool must bind the timeout on each candidate beforehand. An unstamped instance falls back to the 120-second read-only default, letting a wedged binary hold the whole round for that long.