uv/scripts
Zanie Blue 248d6f89ef
Bring harmony to the test snapshot filtering situation (#2678)
The snapshot filtering situation has gotten way out of hand, with each
test hand-rolling it's own filters on top of copied cruft from previous
tests.

I've attempted to address this holistically:

- `TestContext.filters()` has everything you should need 
- This was introduced a while ago, but needed a few more filters for it
to be generalized everywhere
- Using `INSTA_FILTERS` is **not recommended** unless you do not want
the context filters
    - It is okay to extend these filters for things unrelated to paths
- If you have to write a custom path filter, please highlight it in
review so we can address it in the common module
- `TestContext.site_packages()` gives cross-platform access to the
site-packages directory
    - Do not manually construct the path to site-packages from the venv
- Do not turn off tests on Windows because you manually constructed a
Unix path to site-packages
- `TestContext.workspace_root` gives access to uv's repository directory
    - Use this for installing from `scripts/packages/`
- If you need coverage for relative paths, copy the test package into
the `temp_dir` don't change the working directory of the test fixture

There is additional work that can be done here, such as:

- Auditing and removing additional uses of `INSTA_FILTERS`
- Updating manual construction of `Command` instances to use a utility
- The `venv` tests are particularly frightening in their lack of a test
context and could use some love
- Improving the developer experience i.e. apply context filters to
snapshots by default
2024-03-27 14:10:12 +00:00
..
bench Fast lint CI job: Rustfmt, Prettier, Ruff (#2406) 2024-03-20 00:16:46 +00:00
benchmarks Rename to `uv` (#1302) 2024-02-15 11:19:46 -06:00
bootstrap Download Python versions concurrently in bootstrapping script (#2513) 2024-03-19 19:27:51 -05:00
packages Avoid `prepare_metadata_for_build_wheel` calls for Hatch packages with dynamic dependencies (#2645) 2024-03-25 22:26:51 +00:00
popular_packages Finish install-many with pypi 10k most dependents (#732) 2023-12-27 09:42:51 -05:00
release Update the lockfile in `release/bump.sh` (#1924) 2024-02-23 13:45:46 -06:00
requirements Replace boto3.in with slow scenario (#2451) 2024-03-14 09:58:01 +00:00
scenarios Bring harmony to the test snapshot filtering situation (#2678) 2024-03-27 14:10:12 +00:00
wheels Win Trampoline: Use Python executable path encoded in binary (#1803) 2024-02-22 16:10:02 +01:00
check_system_python.py Don't install `pydantic_core` on Python 3.13 (#2595) 2024-03-21 14:15:43 -04:00
transform_readme.py Add top-level benchmark to the README (#2622) 2024-03-22 16:07:31 -04:00