# Testing signals — astral-sh/uv

> Canonical page: https://codevetter.com/unpack/uv/testing-signals

# Testing signals — astral-sh/uv

Scanned commit a9e231a7e377342084d1c0b6009409bdec41acc5 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Tests are Rust integration tests first, driven by cargo-nextest and insta snapshots. The uv crate's tests/ tree is split by command family (it, pip, project, python, sync, tool, workspace, lock, lock_scenarios, build). A uv-test harness provides TestContext and the uv_snapshot! macro. CI runs nextest on Linux, macOS, and Windows after installing Python with uv python install, and uploads JUnit plus pending snapshots on failure. Feature flags carve out network, Git LFS, ecosystem, and Windows-registry tests so local runs can skip them. Packse scenarios and ecosystem lock snapshots cover resolver behavior that unit tests cannot.
- CONTRIBUTING.md requires cargo nextest. A single test is cargo nextest run -E 'test(test_name)'. Snapshots update with cargo insta test --accept --test-runner nextest. Local development is cargo run -- <args>. Python interpreters for tests are installed with cargo run python install and UV_PYTHON_INSTALL_DIR. Git and Git LFS tests can be disabled with the git and git-lfs features. — [CONTRIBUTING.md#L63-L148](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/CONTRIBUTING.md#L63-L148)
- The uv-test harness defines TestContext and the uv_snapshot! macro, which expands through capture_uv_snapshot! and INSTA_FILTERS. The documented pattern is TestContext::new("3.12") then uv_snapshot!(context.filters(), context.add().arg("requests"), @""). — [crates/uv-test/src/lib.rs#L131](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-test/src/lib.rs#L131) [crates/uv-test/src/lib.rs#L2128](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-test/src/lib.rs#L2128) [crates/uv-test/src/lib.rs#L2650-L2652](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-test/src/lib.rs#L2650-L2652) [CONTRIBUTING.md#L105-L109](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/CONTRIBUTING.md#L105-L109)
- Integration tests live under crates/uv/tests and are grouped as it (auth, network, publish, ecosystem, help), pip (compile, install, sync, freeze, list, show, tree, uninstall, check), project (init, run, workflow, export, edit), python, sync, tool, workspace, lock, and lock_scenarios. Ecosystem tests snapshot real upstream lockfiles such as black, httpx, pandas, and warehouse. — [crates/uv/tests/it/ecosystem.rs](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/tests/it/ecosystem.rs) [crates/uv/tests/project/workflow.rs](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/tests/project/workflow.rs) [crates/uv/tests/pip/pip_sync.rs](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/tests/pip/pip_sync.rs)
- Default uv features enable test-defaults, which turns on test-crates-io, test-git, test-git-lfs, test-pypi, test-r2, test-python, test-python-managed, test-python-eol, test-slow, test-ecosystem, and test-universal. test-windows-registry is off by default because it mutates the Windows registry and is enabled by Windows CI. test-python-patch is not in the default set. — [crates/uv/Cargo.toml#L174-L215](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/Cargo.toml#L174-L215)
- Linux CI (cargo test on linux in test.yml) installs mold, the Rust toolchain, a pinned uv 0.12.13, and Python via uv python install. It starts gnome-keyring, and creates btrfs, tmpfs, and minix filesystems exposed as UV_INTERNAL__TEST_COW_FS, UV_INTERNAL__TEST_NOCOW_FS, UV_INTERNAL__TEST_ALT_FS, and UV_INTERNAL__TEST_LOWLINKS_FS. — [.github/workflows/test.yml#L30-L116](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/test.yml#L30-L116)
- The Linux nextest invocation is uv run --only-dev cargo nextest run --cargo-profile fast-build-nightly -Z panic-abort-tests -Z checksum-freshness --features test-python-patch,test-universal,native-auth,secret-service --workspace --profile ci-linux. INSTA_UPDATE=new writes failures to pending-snapshots, which the workflow uploads on failure along with target/nextest/ci*/junit.xml. — [.github/workflows/test.yml#L110-L148](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/test.yml#L110-L148)
- test-integration.yml is a workflow_call that downloads a built uv binary and runs shell-level checks, including nushell activation (overlay use .venv/bin/activate.nu) and a conda job via setup-miniconda. It does not replace cargo nextest. — [.github/workflows/test-integration.yml#L1-L80](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/test-integration.yml#L1-L80)
- Dev-only generation commands live in the uv-dev binary: generate-json-schema, generate-options-reference, generate-cli-reference, generate-env-vars-reference, generate-preview-features-reference, generate-scenario-tests, and generate-all. check-generated-files.yml runs when plan.yml sets test-code. — [crates/uv-dev/src/lib.rs#L44-L77](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-dev/src/lib.rs#L44-L77) [.github/workflows/ci.yml#L85-L91](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/ci.yml#L85-L91)
- Resolver fixtures also exist as checked-in data under test/scenarios (189 TOML files), test/ecosystem, test/workspaces, and test/requirements. Lock scenario tests are crates/uv/tests/lock_scenarios. These are the intended place for dependency-resolution regressions rather than new unit tests. — [crates/uv/tests/lock_scenarios/lock_scenarios.rs](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/tests/lock_scenarios/lock_scenarios.rs) [crates/uv-dev/src/lib.rs#L70-L71](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-dev/src/lib.rs#L70-L71)
- Unit tests exist beside library code (for example uv-lock snapshot tests for missing hashes and source kinds, uv-client HTML simple-API parser tests, and UvError chain snapshots in commands/mod.rs). CONTRIBUTING and AGENTS.md say to prefer crates/uv/tests integration tests and insta snapshots over substring assertions, and to check that a behavior is not already covered. — [AGENTS.md#L3-L6](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/AGENTS.md#L3-L6) [crates/uv/src/commands/mod.rs#L192-L198](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv/src/commands/mod.rs#L192-L198) [crates/uv-lock/src/lock/mod.rs](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/crates/uv-lock/src/lock/mod.rs)
- There is no single application-level test that boots the Docker scratch image or the maturin wheel as part of the cargo nextest profile cited above. Smoke coverage is a separate CI job, test-smoke.yml, which depends on build-dev-binaries and only runs when plan.yml sets test-smoke. — [.github/workflows/ci.yml#L108-L120](https://github.com/astral-sh/uv/blob/a9e231a7e377342084d1c0b6009409bdec41acc5/.github/workflows/ci.yml#L108-L120)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
