tests.test_cli_which module¶

tests.test_cli_which.subcmd()[source]¶
class tests.test_cli_which.TestWhich[source]¶

Bases: CLITableTests

columns_registry: tuple = ((ColumnSpec(id='manager_id', label='Manager ID', description='Manager whose search path found the binary.', max_width=None, optional=False, sortable=True), SortableField.MANAGER_ID), (ColumnSpec(id='priority', label='Priority', description="Rank of the match in the manager's search path.", max_width=None, optional=False, sortable=True), None), (ColumnSpec(id='cli_path', label='CLI path', description='Location of the matched binary.', max_width=None, optional=False, sortable=True), None), (ColumnSpec(id='symlink', label='Symlink destination', description='Resolved target when the match is a symlink.', max_width=None, optional=False, sortable=True), None))¶

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', 'cli_path')¶

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.