Should return shutil.which's result, or fall back to bare 'uv' when not on PATH.
(monkeypatch: pytest.MonkeyPatch, which_result: str | None, expected: str)
| 160 | |
| 161 | @pytest.mark.parametrize("which_result, expected", [("/usr/local/bin/uv", "/usr/local/bin/uv"), (None, "uv")]) |
| 162 | def test_get_uv_path(monkeypatch: pytest.MonkeyPatch, which_result: str | None, expected: str): |
| 163 | """Should return shutil.which's result, or fall back to bare 'uv' when not on PATH.""" |
| 164 | |
| 165 | def fake_which(cmd: str) -> str | None: |
| 166 | return which_result |
| 167 | |
| 168 | monkeypatch.setattr("shutil.which", fake_which) |
| 169 | assert get_uv_path() == expected |
| 170 | |
| 171 | |
| 172 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected