Skip to content

Commit

Permalink
Make test case more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jan 15, 2025
1 parent 200698f commit 4f2dfba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/uv-python/src/managed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ impl ManagedPythonInstallation {
}

/// Generate a platform portion of a key from the environment.
fn platform_key_from_env() -> Result<String, Error> {
pub fn platform_key_from_env() -> Result<String, Error> {
let os = Os::from_env();
let arch = Arch::from_env();
let libc = Libc::from_env()?;
Expand Down
8 changes: 6 additions & 2 deletions crates/uv/tests/it/python_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,21 +881,25 @@ fn python_install_preview_broken_link() {
#[test]
fn python_dylib_install_name_is_patched_on_install() {
use assert_cmd::assert::OutputAssertExt;
use uv_python::managed::platform_key_from_env;

let context: TestContext = TestContext::new_with_versions(&[]).with_filtered_python_keys();

// Install the latest version
context
.python_install()
.arg("--preview")
.arg("3.13")
.arg("3.13.1")
.assert()
.success();

let dylib = context
.temp_dir
.child("managed")
.child("cpython-3.13.1-macos-aarch64-none")
.child(format!(
"cpython-3.13.1-{}",
platform_key_from_env().unwrap()
))
.child("lib")
.child(format!(
"{}python3.13{}",
Expand Down

0 comments on commit 4f2dfba

Please sign in to comment.