tests.test_cli_outdated module¶

tests.test_cli_outdated.subcmd()[source]¶
class tests.test_cli_outdated.TestOutdated[source]¶

Bases: CLITableTests, CLIQueryTests

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), (ColumnSpec(id='latest_version', label='Latest version', description='Version available for upgrade.', max_width='auto', 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.

test_json_parsing(invoke, subcmd)[source]¶
test_plugin_output_keeps_ansi(invoke, subcmd, fake_pool, monkeypatch)[source]¶

Plugin output keeps its version-diff colors on a non-TTY stream.

The bar plugin captures mpm outdated --plugin-output through a pipe, where echo’s TTY auto-detection would strip every ANSI code: the renderer forces colors so they actually reach SwiftBar and Xbar.

test_query_filter(invoke, fake_pool, args, expected_ids)[source]¶