Macros§
- get_bin
- Return the path to the uv binary.
- test_
context - Create a new
TestContextwith the given Python version. - test_
context_ with_ versions - Create a new
TestContextwith zero or more Python versions. - uv_
snapshot - Run [
assert_cmd_snapshot!], with default filters or with custom filters.
Structs§
- Read
Only Directory Guard - A guard that sets a directory to read-only and restores original permissions when dropped.
- Test
Context - Create a context for tests which simplifies shared behavior across tests.
Enums§
Constants§
- DEFAULT_
PYTHON_ VERSION - LATEST_
PYTHON_ 3_ 10 - LATEST_
PYTHON_ 3_ 11 - LATEST_
PYTHON_ 3_ 12 - LATEST_
PYTHON_ 3_ 13 - LATEST_
PYTHON_ 3_ 14 - LATEST_
PYTHON_ 3_ 15 - PACKSE_
VERSION - READ_
ONLY_ GITHUB_ SSH_ DEPLOY_ KEY - READ_
ONLY_ GITHUB_ TOKEN - READ_
ONLY_ GITHUB_ TOKEN_ 2
Functions§
- apply_
filters - Helper method to apply filters to a string. Useful when
!uv_snapshotcannot be used. - build_
vendor_ links_ url - Using a find links url allows using
--index-urlinstead of--extra-index-urlin tests to prevent dependency confusion attacks against our test suite. - copy_
dir_ ignore - Recursively copy a directory and its contents, skipping gitignored files.
- create_
venv_ from_ executable - Create a virtual environment at the given path.
- decode_
token - Decode a split, base64 encoded authentication token. We split and encode the token to bypass revoke by GitHub’s secret scanning
- diff_
snapshot - Creates a “unified” diff between the two line-oriented strings suitable for snapshotting.
- download_
to_ disk - Simulates
reqwest::blocking::getbut returns bytes directly, and disables certificate verification, passing through theBaseClient - get_
python - Get the path to the python interpreter for a specific python version.
- make_
project - Create a stub package
nameindirwith the givenpyproject.tomlbody. - packse_
index_ url - python_
installations_ for_ versions - Returns a list of Python executables for the given versions.
- python_
path_ with_ versions - Create a
PATHwith the requested Python versions available in order. - run_
and_ format - Execute the command and format its output status, stdout and stderr into a snapshot string.
- run_
and_ format_ with_ status - Execute the command and format its output status, stdout and stderr into a snapshot string.
- site_
packages_ path - venv_
bin_ path