tests.test_cli_orphans module¶
- class tests.test_cli_orphans.TestOrphans[source]¶
Bases:
CLITableTests,CLIQueryTestsPin the whole class to
fake_pool.Unlike the other
CLITableTestssubcommands,orphansis implemented by only a subset of managers (all Linux, BSD or macOS tools), so no default-selected manager implements it on every platform: Windows has none. The inherited real-pool template tests would resolve there toNo manager selected.instead of the0exit they assert, so the deterministic fake pool stands in on every host.- columns_registry: tuple = ((ColumnSpec(id='package_id', label='Package ID', description="Package's identifier.", max_width=None, optional=False, sortable=True), SortableField.PACKAGE_ID), (ColumnSpec(id='package_name', label='Name', description="Package's common name.", max_width='auto', optional=False, sortable=True), SortableField.PACKAGE_NAME), (ColumnSpec(id='manager_id', label='Manager', description='Manager reporting the package.', max_width=None, optional=False, sortable=True), SortableField.MANAGER_ID), (ColumnSpec(id='installed_version', label='Installed version', description='Version currently installed.', max_width='auto', optional=False, sortable=True), SortableField.VERSION))¶
The subcommand’s column registry (a
tables.py*_COLUMNSconstant).Set by each subclass so the generic
--columnstests below resolve column IDs to their header labels from the same source of truth the CLI uses.
- pytestmark = [Mark(name='usefixtures', args=('fake_pool',), kwargs={})]¶