ruff/crates/ty_python_semantic
Alex Waygood ad2f667ee4
[ty] Improve tests for `site-packages` discovery (#18374)
## Summary

- Convert tests demonstrating our resilience to malformed/absent
`version` fields in `pyvenf.cfg` files to mdtests. Also make them more
expansive.
- Convert the regression test I added in
https://github.com/astral-sh/ruff/pull/18157 to an mdtest
- Add comments next to unit tests that cannot be converted to mdtests
(but where it's not obvious why they can't) so I don't have to do this
exercise again 😄
- In `site_packages.rs`, factor out the logic for figuring out where we
expect the system-installation `site-packages` to be. Currently we have
the same logic twice.

## Test Plan

`cargo test -p ty_python_semantic`
2025-05-30 07:32:21 +01:00
..
resources [ty] Improve tests for `site-packages` discovery (#18374) 2025-05-30 07:32:21 +01:00
src [ty] Improve tests for `site-packages` discovery (#18374) 2025-05-30 07:32:21 +01:00
tests Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
Cargo.toml Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
build.rs Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
mdtest.py Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
mdtest.py.lock Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00