8OI-511 regression tests — ``oct test`` must surface an actionable install
9hint when pytest is missing. Because ``pytest`` is declared only in the
10``[project.optional-dependencies].test`` extra, users who install the
11runtime-only package and try to run ``oct test`` should see the hint
12rather than a bare ``No module named pytest`` traceback.
16- ``_pytest_missing`` flags the sentinel string pytest emits when not
17 importable and returns False otherwise.
18- ``_PYTEST_INSTALL_HINT`` references the ``oct[test]`` extra so users
19 discover the canonical install path.
26 L3 — assertion details
31- Must never claim pytest is missing on a benign pytest failure (e.g.
35from oct.cli import _PYTEST_INSTALL_HINT, _pytest_missing
40 "C:\\Python\\python.exe: No module named pytest\n"
42 assert _pytest_missing(sample)
is True
47 "tests/foo.py::test_bar FAILED\n"
48 "AssertionError: nope\n"
50 assert _pytest_missing(sample)
is False
54 assert "oct[test]" in _PYTEST_INSTALL_HINT
55 assert "pytest" in _PYTEST_INSTALL_HINT
test_install_hint_mentions_oct_test_extra()
test_does_not_flag_normal_failure_as_missing()
test_detects_missing_pytest_in_output()