Option C Tools
Loading...
Searching...
No Matches
test_version_option Namespace Reference

Functions

 test_version_long_flag_prints_version ()
 test_version_short_flag_prints_version ()
 test_help_output_starts_with_version ()
 test_version_is_resolved_from_metadata ()

Detailed Description

Purpose
-------
OI-524 regression tests — ``oct --version`` / ``-V`` must surface the OCT
version, and ``oct --help`` must show the version at the top of its output.
This closes the HIGH-priority developer note in V5.0 Phase 2 requiring the
version to be visible without a dedicated command.

Responsibilities
----------------
- ``oct --version`` prints ``oct <version>`` and exits 0.
- ``-V`` shortcut behaves identically.
- ``oct --help`` output begins with the version line.
- ``__version__`` resolves to a non-empty, non-"unknown" value in the
  installed editable environment.

Diagnostics
-----------
Domain: CLI-TESTS
Levels:
    L2 — test lifecycle
    L3 — assertion details
    L4 — deep tracing

Contracts
---------
- Must never regress: any future change to ``OctGroup.format_help`` or the
  ``@click.version_option`` decorator must keep the version on the first
  non-empty line of ``--help``.

Function Documentation

◆ test_help_output_starts_with_version()

test_version_option.test_help_output_starts_with_version ( )

Definition at line 56 of file test_version_option.py.

◆ test_version_is_resolved_from_metadata()

test_version_option.test_version_is_resolved_from_metadata ( )

Definition at line 66 of file test_version_option.py.

◆ test_version_long_flag_prints_version()

test_version_option.test_version_long_flag_prints_version ( )

Definition at line 42 of file test_version_option.py.

◆ test_version_short_flag_prints_version()

test_version_option.test_version_short_flag_prints_version ( )

Definition at line 49 of file test_version_option.py.