tests.test_cli_orphans module

tests.test_cli_orphans.subcmd()[source]
class tests.test_cli_orphans.TestOrphans[source]

Bases: CLITableTests, CLIQueryTests

Pin the whole class to fake_pool.

Unlike the other CLITableTests subcommands, orphans is 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 to No manager selected. instead of the 0 exit 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 *_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.

test_json_parsing(invoke, subcmd, fake_pool)[source]
test_query_filter(invoke, fake_pool, args, expected_ids)[source]
pytestmark = [Mark(name='usefixtures', args=('fake_pool',), kwargs={})]