tests.test_manager_nala module

Nala output tests.

These tests stub run_cli and replay the samples documented on Nala. They never call nala.

tests.test_manager_nala.INSTALLED_RECORD = 'vim 2:8.2.3995-1+b2 [Debian/sid main]\n+-- is installed\n`-- Vi IMproved - enhanced vi editor'

nala list --installed, as the docstring of installed shows it.

tests.test_manager_nala.UPGRADABLE_RECORD = 'vim 2:8.2.3995-1+b2 [Debian/sid main]\n+-- is installed and upgradable to 2:8.2.4659-1\n`-- Vi IMproved - enhanced vi editor'

nala list --upgradable, as the docstring of outdated shows it.

tests.test_manager_nala.UNICODE_UPGRADABLE_RECORD = 'vim 2:8.2.3995-1+b2 [Debian/sid main]\n├── is installed and upgradable to 2:8.2.4659-1\n└── Vi IMproved - enhanced vi editor'

UPGRADABLE_RECORD with the Unicode glyphs nala uses when LC_ALL=C fails to select the ASCII pair.

tests.test_manager_nala.test_installed(stub_run_cli)[source]

A record gives its package and the version of its first line.

tests.test_manager_nala.test_outdated(stub_run_cli, output)[source]

The candidate comes from the status branch.

The installed version comes from the first line, whichever glyphs draw the branches.

tests.test_manager_nala.test_outdated_skips_a_record_without_candidate(stub_run_cli)[source]

A record naming no version to move to is not an outdated package.

A search result is a record like those of list.

Its version is the latest available.

The docstring of search() documents the command alone, so the record of list stands in for its output: nala 0.18.2 prints both through one shared function.