tests.test_manager_uv module¶
uv-specific behaviors: the launched-by-uv cache guard and the PEP 668 guard.
A parent uv run (or uvx) process keeps a lock on the uv cache for as long
as its child lives, so an mpm launched through it must not attempt uv cache
clean: the command would wait on its own ancestor for``UV_LOCK_TIMEOUT`` and
fail. uv marks its children with the UV environment variable.
Outside a virtual environment, uv pip reads a system Python. When that Python
is externally managed, the uv manager reports as unavailable.
- tests.test_manager_uv.uv_manager(monkeypatch)[source]¶
A new
uvmanager that meets every base condition of availability.
The interpreter
uv python findnames runs the PEP 668 probe.
- tests.test_manager_uv.test_failed_probe_keeps_uv_available(uv_manager, answers)[source]¶
A probe that cannot answer must not hide the manager.
- tests.test_manager_uv.test_base_reason_wins_over_the_python_probe(monkeypatch)[source]¶
A host failing a base condition reports it, and runs no probe.
- tests.test_manager_uv.test_uvx_runs_no_python_probe(monkeypatch)[source]¶
uv toolkeeps each tool in its own virtual environment: no probe.
- tests.test_manager_uv.capture_uv_run_cli(capture_run_cli)[source]¶
Record the
uvmanager’srun_cliinvocations instead of executing.