Skip to content

Stabilize doctor missing-venv test when running inside active venv#52

Merged
srichs merged 1 commit intomainfrom
codex/fix-assertion-error-in-test_doctor_reports
Feb 17, 2026
Merged

Stabilize doctor missing-venv test when running inside active venv#52
srichs merged 1 commit intomainfrom
codex/fix-assertion-error-in-test_doctor_reports

Conversation

@srichs
Copy link
Owner

@srichs srichs commented Feb 17, 2026

Motivation

  • The test_doctor_reports_missing_venv_with_hint was flaky when the test runner itself was inside an active virtualenv, causing the test to exercise the wrong branch instead of the expected "no resolved venv" path.

Description

  • In tests/test_cli.py add monkeypatch.setattr("devr.cli.is_inside_venv", lambda: False) to test_doctor_reports_missing_venv_with_hint so the test consistently exercises the missing-venv branch.

Testing

  • Ran pytest -q tests/test_cli.py::test_doctor_reports_missing_venv_with_hint which passed (1 passed).
  • Ran pytest -q tests/test_cli.py which passed (67 passed).

Codex Task

@srichs srichs merged commit 1cee6d1 into main Feb 17, 2026
8 checks passed
@srichs srichs deleted the codex/fix-assertion-error-in-test_doctor_reports branch February 17, 2026 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant