diff --git a/crates/uv/tests/common/mod.rs b/crates/uv/tests/common/mod.rs index 6755d8fec..b746eee1c 100644 --- a/crates/uv/tests/common/mod.rs +++ b/crates/uv/tests/common/mod.rs @@ -417,6 +417,10 @@ pub fn run_and_format<'a>( } } + // This is a heuristic filter meant to try and make *most* of our tests + // pass whether it's on Windows or Unix. In particular, there are some very + // common Windows-only dependencies that, when removed from a resolution, + // cause the set of dependencies to be the same across platforms. if cfg!(windows) && windows_filters { // The optional leading +/- is for install logs, the optional next line is for lock files let windows_only_deps = [ diff --git a/crates/uv/tests/pip_compile.rs b/crates/uv/tests/pip_compile.rs index 8cc338610..f788e2bd2 100644 --- a/crates/uv/tests/pip_compile.rs +++ b/crates/uv/tests/pip_compile.rs @@ -6294,3 +6294,37 @@ fn emit_marker_expression_pypy() -> Result<()> { Ok(()) } + +#[test] +fn pendulum_no_tzdata_on_windows() -> Result<()> { + let context = TestContext::new("3.12"); + let requirements_in = context.temp_dir.child("requirements.in"); + requirements_in.write_str("pendulum")?; + + uv_snapshot!( + context.filters(), + windows_filters=false, + context.compile().arg("requirements.in"), @r###" + success: true + exit_code: 0 + ----- stdout ----- + # This file was autogenerated by uv via the following command: + # uv pip compile --cache-dir [CACHE_DIR] --exclude-newer 2024-03-25T00:00:00Z requirements.in + pendulum==3.0.0 + python-dateutil==2.9.0.post0 + # via + # pendulum + # time-machine + six==1.16.0 + # via python-dateutil + time-machine==2.14.1 + # via pendulum + tzdata==2024.1 + # via pendulum + + ----- stderr ----- + Resolved 5 packages in [TIME] + "###); + + Ok(()) +}