Use the Python download cache during `python_upgrade` tests (#16421)

This commit is contained in:
Zanie Blue 2025-10-23 10:48:45 -05:00 committed by GitHub
parent 1fbc1c7ff4
commit 940a3f63ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -9,6 +9,7 @@ use uv_static::EnvVars;
#[test]
fn python_upgrade() {
let context: TestContext = TestContext::new_with_versions(&[])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -93,6 +94,7 @@ fn python_upgrade() {
#[test]
fn python_upgrade_without_version() {
let context: TestContext = TestContext::new_with_versions(&[])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -161,6 +163,7 @@ fn python_upgrade_without_version() {
#[test]
fn python_upgrade_transparent_from_venv() {
let context: TestContext = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -263,6 +266,7 @@ fn python_upgrade_transparent_from_venv() {
#[test]
fn python_upgrade_transparent_from_venv_preview() {
let context: TestContext = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -326,6 +330,7 @@ fn python_upgrade_transparent_from_venv_preview() {
#[test]
fn python_upgrade_ignored_with_python_pin() {
let context: TestContext = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -391,6 +396,7 @@ fn python_upgrade_ignored_with_python_pin() {
#[test]
fn python_no_transparent_upgrade_with_venv_patch_specification() {
let context: TestContext = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs();
@ -456,6 +462,7 @@ fn python_no_transparent_upgrade_with_venv_patch_specification() {
#[test]
fn python_transparent_upgrade_venv_venv() {
let context: TestContext = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_filtered_virtualenv_bin()
@ -549,6 +556,7 @@ fn python_transparent_upgrade_venv_venv() {
#[test]
fn python_upgrade_transparent_from_venv_module() {
let context = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs()
@ -616,6 +624,7 @@ fn python_upgrade_transparent_from_venv_module() {
#[test]
fn python_upgrade_transparent_from_venv_module_in_venv() {
let context = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_managed_python_dirs()
@ -703,6 +712,7 @@ fn python_upgrade_transparent_from_venv_module_in_venv() {
#[test]
fn python_upgrade_force_install() -> Result<()> {
let context = TestContext::new_with_versions(&["3.13"])
.with_python_download_cache()
.with_filtered_python_keys()
.with_filtered_exe_suffix()
.with_empty_python_install_mirror()