tests.test_cli_outdated module¶
- 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*_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.
- 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-outputthrough a pipe, whereecho’s TTY auto-detection would strip every ANSI code: the renderer forces colors so they actually reach SwiftBar and Xbar.