[red-knot] Fix build on Windows (#12719)

## Summary

Tests are failing on `main` because automerge landed
https://github.com/astral-sh/ruff/pull/12716 despite the Windows tests
failing.
This commit is contained in:
Alex Waygood 2024-08-06 20:21:25 +01:00 committed by GitHub
parent 7fa76a2b2b
commit aae9619d3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -603,7 +603,6 @@ impl PackageKind {
#[cfg(test)]
mod tests {
use anyhow::Context;
use ruff_db::files::{system_path_to_file, File, FilePath};
use ruff_db::system::DbWithTestSystem;
use ruff_db::testing::{
@ -1133,10 +1132,13 @@ mod tests {
#[test]
#[cfg(target_family = "unix")]
fn symlink() -> anyhow::Result<()> {
use crate::db::tests::TestDb;
use anyhow::Context;
use ruff_db::program::Program;
use ruff_db::system::{OsSystem, SystemPath};
use crate::db::tests::TestDb;
let mut db = TestDb::new();
let temp_dir = tempfile::tempdir()?;

View file

@ -35,7 +35,7 @@ fn site_packages_dir_from_sys_prefix(
sys_prefix_path: &SystemPath,
system: &dyn System,
) -> Result<SystemPathBuf, SitePackagesDiscoveryError> {
let site_packages = venv_path.join("Lib/site-packages");
let site_packages = sys_prefix_path.join("Lib/site-packages");
system
.is_directory(&site_packages)
.then_some(site_packages)