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

Functions

 test_detects_missing_pytest_in_output ()
 test_does_not_flag_normal_failure_as_missing ()
 test_install_hint_mentions_oct_test_extra ()

Detailed Description

Purpose
-------
OI-511 regression tests — ``oct test`` must surface an actionable install
hint when pytest is missing. Because ``pytest`` is declared only in the
``[project.optional-dependencies].test`` extra, users who install the
runtime-only package and try to run ``oct test`` should see the hint
rather than a bare ``No module named pytest`` traceback.

Responsibilities
----------------
- ``_pytest_missing`` flags the sentinel string pytest emits when not
  importable and returns False otherwise.
- ``_PYTEST_INSTALL_HINT`` references the ``oct[test]`` extra so users
  discover the canonical install path.

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

Contracts
---------
- Must never claim pytest is missing on a benign pytest failure (e.g.
  assertion mismatch).

Function Documentation

◆ test_detects_missing_pytest_in_output()

test_pytest_missing_hint.test_detects_missing_pytest_in_output ( )

Definition at line 38 of file test_pytest_missing_hint.py.

◆ test_does_not_flag_normal_failure_as_missing()

test_pytest_missing_hint.test_does_not_flag_normal_failure_as_missing ( )

Definition at line 45 of file test_pytest_missing_hint.py.

◆ test_install_hint_mentions_oct_test_extra()

test_pytest_missing_hint.test_install_hint_mentions_oct_test_extra ( )

Definition at line 53 of file test_pytest_missing_hint.py.