`agy` is registered but disabled (TTY-only, uncapturable): fail closed.
| 701 | |
| 702 | |
| 703 | class TestAntigravityDisabled: |
| 704 | """`agy` is registered but disabled (TTY-only, uncapturable): fail closed.""" |
| 705 | |
| 706 | def test_build_argv_refuses_to_run(self) -> None: |
| 707 | with pytest.raises(AgentCLIError, match="cannot be driven programmatically"): |
| 708 | _agent_cli._build_agy_argv("agy", "", 4096) |
| 709 | |
| 710 | def test_auth_check_reports_disabled(self) -> None: |
| 711 | ok, reason = _agent_cli._agy_auth_check("agy") |
| 712 | assert ok is False |
| 713 | assert "disabled" in (reason or "") |
| 714 | |
| 715 | def test_is_available_false_even_when_binary_present( |
| 716 | self, monkeypatch: pytest.MonkeyPatch |
| 717 | ) -> None: |
| 718 | # Even with the binary on PATH, the disabled provider stays unavailable. |
| 719 | monkeypatch.setattr(_agent_cli, "find_binary", lambda _name: "/usr/bin/agy") |
| 720 | ok, reason = _agent_cli.is_available("agy") |
| 721 | assert ok is False |
| 722 | assert "disabled" in (reason or "") |
nothing calls this directly
no outgoing calls
no test coverage detected