mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:41:23 +00:00
[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:
parent
7fa76a2b2b
commit
aae9619d3d
2 changed files with 5 additions and 3 deletions
|
@ -603,7 +603,6 @@ impl PackageKind {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use anyhow::Context;
|
|
||||||
use ruff_db::files::{system_path_to_file, File, FilePath};
|
use ruff_db::files::{system_path_to_file, File, FilePath};
|
||||||
use ruff_db::system::DbWithTestSystem;
|
use ruff_db::system::DbWithTestSystem;
|
||||||
use ruff_db::testing::{
|
use ruff_db::testing::{
|
||||||
|
@ -1133,10 +1132,13 @@ mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_family = "unix")]
|
#[cfg(target_family = "unix")]
|
||||||
fn symlink() -> anyhow::Result<()> {
|
fn symlink() -> anyhow::Result<()> {
|
||||||
use crate::db::tests::TestDb;
|
use anyhow::Context;
|
||||||
|
|
||||||
use ruff_db::program::Program;
|
use ruff_db::program::Program;
|
||||||
use ruff_db::system::{OsSystem, SystemPath};
|
use ruff_db::system::{OsSystem, SystemPath};
|
||||||
|
|
||||||
|
use crate::db::tests::TestDb;
|
||||||
|
|
||||||
let mut db = TestDb::new();
|
let mut db = TestDb::new();
|
||||||
|
|
||||||
let temp_dir = tempfile::tempdir()?;
|
let temp_dir = tempfile::tempdir()?;
|
||||||
|
|
|
@ -35,7 +35,7 @@ fn site_packages_dir_from_sys_prefix(
|
||||||
sys_prefix_path: &SystemPath,
|
sys_prefix_path: &SystemPath,
|
||||||
system: &dyn System,
|
system: &dyn System,
|
||||||
) -> Result<SystemPathBuf, SitePackagesDiscoveryError> {
|
) -> Result<SystemPathBuf, SitePackagesDiscoveryError> {
|
||||||
let site_packages = venv_path.join("Lib/site-packages");
|
let site_packages = sys_prefix_path.join("Lib/site-packages");
|
||||||
system
|
system
|
||||||
.is_directory(&site_packages)
|
.is_directory(&site_packages)
|
||||||
.then_some(site_packages)
|
.then_some(site_packages)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue