tests.test_cli_backup module¶
- tests.test_cli_backup.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.
- tests.test_cli_backup.test_output_to_console(invoke, subcmd, fake_pool)[source]¶
An explicit
-target prints to<stdout>.The three destination tests below run on the fake pool: what varies between them is where the snapshot lands, not what is in it, and re-collecting the host’s inventory for each cost twenty seconds a case.
test_default_all_managers_output_to_consolekeeps the live one.
- tests.test_cli_backup.test_output_to_file_creates_missing_parents(invoke, subcmd, fake_pool)[source]¶
A destination whose directory does not exist yet is created, not an error.
Regression: mpm used to open the target directly, so a path into a missing directory died on an unhandled
FileNotFoundError. Adopting click-extra’sprep_pathbrought themkdir -pwith it.
- tests.test_cli_backup.test_in_place_modes_need_a_file(invoke, subcmd, fake_pool, flag)[source]¶
--mergeand--update-versionedit a file, so<stdout>is refused.
- tests.test_cli_backup.test_in_place_modes_need_an_existing_file(invoke, subcmd, fake_pool, flag)[source]¶
There is nothing to edit in place when the target does not exist yet.
- tests.test_cli_backup.test_merge_and_update_version_are_exclusive(invoke, subcmd, fake_pool)[source]¶
- tests.test_cli_backup.test_existing_target_needs_overwrite(invoke, subcmd, fake_pool, flag)[source]¶
An existing snapshot survives a dump, unless an overwrite flag is passed.