Skip to content

Add test case for automatic installs#10913

Merged
zanieb merged 1 commit intomainfrom
zb/install-auto-test
Jan 23, 2025
Merged

Add test case for automatic installs#10913
zanieb merged 1 commit intomainfrom
zb/install-auto-test

Conversation

@zanieb
Copy link
Member

@zanieb zanieb commented Jan 23, 2025

Coverage for #10908 (and more)

@@ -240,17 +240,11 @@ impl TestContext {
#[must_use]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is extra clean-up, I could split into a separate change but it's not particularly important.

Comment on lines +183 to +203
// We should ignore the broken executable and download a version still
uv_snapshot!(context.filters(), context.run()
.env_remove("VIRTUAL_ENV")
// In tests, we ignore `PATH` during Python discovery so we need to add the context `bin`
.env("UV_TEST_PYTHON_PATH", context.bin_dir.as_os_str())
.arg("-p").arg("3.11")
.arg("python").arg("-c").arg("import sys; print(sys.version_info[:2])"), @r###"
success: false
exit_code: 2
----- stdout -----

----- stderr -----
error: Failed to inspect Python interpreter from search path at `/Users/zb/.local/share/uv/tests/[TMP]/python3`
Caused by: Querying Python at `/Users/zb/.local/share/uv/tests/[TMP]/python3` failed with exit status exit status: 1

[stderr]
error: intentionally broken python executable
"###);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case resolved by #10908

@zanieb zanieb force-pushed the zb/install-auto-test branch from 3766382 to c32e611 Compare January 23, 2025 21:23
zanieb added a commit that referenced this pull request Jan 23, 2025
First of all, I want to test automatic managed installs (see #10913) and
need to set that up. Second of all, some tests were _implicitly_
downloading interpreters instead of using the one from their context —
which is unexpected and naughty and very slow.
Base automatically changed from zb/install-test to main January 23, 2025 21:24
@zanieb zanieb force-pushed the zb/install-auto-test branch from c32e611 to 38616de Compare January 23, 2025 21:24
@zanieb zanieb added the no-build Disable building binaries in CI label Jan 23, 2025
@zanieb zanieb enabled auto-merge (squash) January 23, 2025 21:27
@zanieb zanieb force-pushed the zb/install-auto-test branch 2 times, most recently from ef20f9d to e7d5324 Compare January 23, 2025 21:55
@zanieb zanieb force-pushed the zb/install-auto-test branch from e7d5324 to e9043f2 Compare January 23, 2025 22:13
@zanieb zanieb merged commit 2a0fa8a into main Jan 23, 2025
72 checks passed
@zanieb zanieb deleted the zb/install-auto-test branch January 23, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-build Disable building binaries in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant