mirror of https://github.com/astral-sh/uv
Remove `VIRTUAL_ENV` from project commmands by default (#6976)
And use test context helpers for commands consistently. Needed for https://github.com/astral-sh/uv/pull/6864
This commit is contained in:
parent
1234b6dcf1
commit
1e89d3e44f
|
|
@ -389,7 +389,7 @@ impl TestContext {
|
||||||
/// Create a uv command for testing.
|
/// Create a uv command for testing.
|
||||||
pub fn command(&self) -> Command {
|
pub fn command(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -403,11 +403,10 @@ impl TestContext {
|
||||||
/// * Hide other Python python with `UV_PYTHON_INSTALL_DIR` and installed interpreters with
|
/// * Hide other Python python with `UV_PYTHON_INSTALL_DIR` and installed interpreters with
|
||||||
/// `UV_TEST_PYTHON_PATH`.
|
/// `UV_TEST_PYTHON_PATH`.
|
||||||
/// * Increase the stack size to avoid stack overflows on windows due to large async functions.
|
/// * Increase the stack size to avoid stack overflows on windows due to large async functions.
|
||||||
pub fn add_shared_args(&self, command: &mut Command) {
|
pub fn add_shared_args(&self, command: &mut Command, activate_venv: bool) {
|
||||||
command
|
command
|
||||||
.arg("--cache-dir")
|
.arg("--cache-dir")
|
||||||
.arg(self.cache_dir.path())
|
.arg(self.cache_dir.path())
|
||||||
.env("VIRTUAL_ENV", self.venv.as_os_str())
|
|
||||||
.env("UV_NO_WRAP", "1")
|
.env("UV_NO_WRAP", "1")
|
||||||
.env("HOME", self.home_dir.as_os_str())
|
.env("HOME", self.home_dir.as_os_str())
|
||||||
.env("UV_PYTHON_INSTALL_DIR", "")
|
.env("UV_PYTHON_INSTALL_DIR", "")
|
||||||
|
|
@ -415,6 +414,10 @@ impl TestContext {
|
||||||
.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER)
|
.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER)
|
||||||
.current_dir(self.temp_dir.path());
|
.current_dir(self.temp_dir.path());
|
||||||
|
|
||||||
|
if activate_venv {
|
||||||
|
command.env("VIRTUAL_ENV", self.venv.as_os_str());
|
||||||
|
}
|
||||||
|
|
||||||
if cfg!(all(windows, debug_assertions)) {
|
if cfg!(all(windows, debug_assertions)) {
|
||||||
// TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the
|
// TODO(konstin): Reduce stack usage in debug mode enough that the tests pass with the
|
||||||
// default windows stack of 1MB
|
// default windows stack of 1MB
|
||||||
|
|
@ -426,7 +429,7 @@ impl TestContext {
|
||||||
pub fn pip_compile(&self) -> Command {
|
pub fn pip_compile(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("pip").arg("compile");
|
command.arg("pip").arg("compile");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -434,7 +437,37 @@ impl TestContext {
|
||||||
pub fn pip_sync(&self) -> Command {
|
pub fn pip_sync(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("pip").arg("sync");
|
command.arg("pip").arg("sync");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
|
command
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pip_show(&self) -> Command {
|
||||||
|
let mut command = Command::new(get_bin());
|
||||||
|
command.arg("pip").arg("show");
|
||||||
|
self.add_shared_args(&mut command, true);
|
||||||
|
command
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a `pip freeze` command with options shared across scenarios.
|
||||||
|
pub fn pip_freeze(&self) -> Command {
|
||||||
|
let mut command = Command::new(get_bin());
|
||||||
|
command.arg("pip").arg("freeze");
|
||||||
|
self.add_shared_args(&mut command, true);
|
||||||
|
command
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Create a `pip check` command with options shared across scenarios.
|
||||||
|
pub fn pip_check(&self) -> Command {
|
||||||
|
let mut command = Command::new(get_bin());
|
||||||
|
command.arg("pip").arg("check");
|
||||||
|
self.add_shared_args(&mut command, true);
|
||||||
|
command
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn pip_list(&self) -> Command {
|
||||||
|
let mut command = Command::new(get_bin());
|
||||||
|
command.arg("pip").arg("list");
|
||||||
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -442,8 +475,7 @@ impl TestContext {
|
||||||
pub fn venv(&self) -> Command {
|
pub fn venv(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("venv");
|
command.arg("venv");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command.env_remove("VIRTUAL_ENV");
|
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -451,7 +483,7 @@ impl TestContext {
|
||||||
pub fn pip_install(&self) -> Command {
|
pub fn pip_install(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("pip").arg("install");
|
command.arg("pip").arg("install");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -459,7 +491,7 @@ impl TestContext {
|
||||||
pub fn pip_uninstall(&self) -> Command {
|
pub fn pip_uninstall(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("pip").arg("uninstall");
|
command.arg("pip").arg("uninstall");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -467,7 +499,7 @@ impl TestContext {
|
||||||
pub fn pip_tree(&self) -> Command {
|
pub fn pip_tree(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("pip").arg("tree");
|
command.arg("pip").arg("tree");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -490,7 +522,7 @@ impl TestContext {
|
||||||
pub fn init(&self) -> Command {
|
pub fn init(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("init");
|
command.arg("init");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -498,7 +530,7 @@ impl TestContext {
|
||||||
pub fn sync(&self) -> Command {
|
pub fn sync(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("sync");
|
command.arg("sync");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -506,7 +538,7 @@ impl TestContext {
|
||||||
pub fn lock(&self) -> Command {
|
pub fn lock(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("lock");
|
command.arg("lock");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -514,7 +546,7 @@ impl TestContext {
|
||||||
pub fn export(&self) -> Command {
|
pub fn export(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("export");
|
command.arg("export");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -527,7 +559,7 @@ impl TestContext {
|
||||||
.env("UV_PREVIEW", "1")
|
.env("UV_PREVIEW", "1")
|
||||||
.env("UV_PYTHON_INSTALL_DIR", "")
|
.env("UV_PYTHON_INSTALL_DIR", "")
|
||||||
.current_dir(&self.temp_dir);
|
.current_dir(&self.temp_dir);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -540,7 +572,7 @@ impl TestContext {
|
||||||
.env("UV_PREVIEW", "1")
|
.env("UV_PREVIEW", "1")
|
||||||
.env("UV_PYTHON_INSTALL_DIR", "")
|
.env("UV_PYTHON_INSTALL_DIR", "")
|
||||||
.current_dir(&self.temp_dir);
|
.current_dir(&self.temp_dir);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -548,7 +580,7 @@ impl TestContext {
|
||||||
pub fn python_dir(&self) -> Command {
|
pub fn python_dir(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("python").arg("dir");
|
command.arg("python").arg("dir");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -556,7 +588,7 @@ impl TestContext {
|
||||||
pub fn run(&self) -> Command {
|
pub fn run(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("run").env("UV_SHOW_RESOLUTION", "1");
|
command.arg("run").env("UV_SHOW_RESOLUTION", "1");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, true);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -567,7 +599,7 @@ impl TestContext {
|
||||||
.arg("tool")
|
.arg("tool")
|
||||||
.arg("run")
|
.arg("run")
|
||||||
.env("UV_SHOW_RESOLUTION", "1");
|
.env("UV_SHOW_RESOLUTION", "1");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -575,7 +607,7 @@ impl TestContext {
|
||||||
pub fn tool_upgrade(&self) -> Command {
|
pub fn tool_upgrade(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tool").arg("upgrade");
|
command.arg("tool").arg("upgrade");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -583,7 +615,7 @@ impl TestContext {
|
||||||
pub fn tool_install(&self) -> Command {
|
pub fn tool_install(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tool").arg("install");
|
command.arg("tool").arg("install");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER);
|
command.env("UV_EXCLUDE_NEWER", EXCLUDE_NEWER);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
@ -592,7 +624,7 @@ impl TestContext {
|
||||||
pub fn tool_list(&self) -> Command {
|
pub fn tool_list(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tool").arg("list");
|
command.arg("tool").arg("list");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -600,7 +632,7 @@ impl TestContext {
|
||||||
pub fn tool_dir(&self) -> Command {
|
pub fn tool_dir(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tool").arg("dir");
|
command.arg("tool").arg("dir");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,7 +640,7 @@ impl TestContext {
|
||||||
pub fn tool_uninstall(&self) -> Command {
|
pub fn tool_uninstall(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tool").arg("uninstall");
|
command.arg("tool").arg("uninstall");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -616,7 +648,7 @@ impl TestContext {
|
||||||
pub fn add(&self, reqs: &[&str]) -> Command {
|
pub fn add(&self, reqs: &[&str]) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("add").args(reqs);
|
command.arg("add").args(reqs);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -624,7 +656,7 @@ impl TestContext {
|
||||||
pub fn add_no_sync(&self, reqs: &[&str]) -> Command {
|
pub fn add_no_sync(&self, reqs: &[&str]) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("add").arg("--no-sync").args(reqs);
|
command.arg("add").arg("--no-sync").args(reqs);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -632,7 +664,7 @@ impl TestContext {
|
||||||
pub fn remove(&self, reqs: &[&str]) -> Command {
|
pub fn remove(&self, reqs: &[&str]) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("remove").args(reqs);
|
command.arg("remove").args(reqs);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -640,7 +672,7 @@ impl TestContext {
|
||||||
pub fn remove_no_sync(&self, reqs: &[&str]) -> Command {
|
pub fn remove_no_sync(&self, reqs: &[&str]) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("remove").arg("--no-sync").args(reqs);
|
command.arg("remove").arg("--no-sync").args(reqs);
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -648,7 +680,7 @@ impl TestContext {
|
||||||
pub fn tree(&self) -> Command {
|
pub fn tree(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("tree");
|
command.arg("tree");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -656,7 +688,7 @@ impl TestContext {
|
||||||
pub fn clean(&self) -> Command {
|
pub fn clean(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("cache").arg("clean");
|
command.arg("cache").arg("clean");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -664,7 +696,7 @@ impl TestContext {
|
||||||
pub fn prune(&self) -> Command {
|
pub fn prune(&self) -> Command {
|
||||||
let mut command = Command::new(get_bin());
|
let mut command = Command::new(get_bin());
|
||||||
command.arg("cache").arg("prune");
|
command.arg("cache").arg("prune");
|
||||||
self.add_shared_args(&mut command);
|
self.add_shared_args(&mut command, false);
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,13 @@
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assert_fs::fixture::FileWriteStr;
|
use assert_fs::fixture::FileWriteStr;
|
||||||
use assert_fs::fixture::PathChild;
|
use assert_fs::fixture::PathChild;
|
||||||
|
|
||||||
use common::uv_snapshot;
|
use common::uv_snapshot;
|
||||||
|
|
||||||
use crate::common::{get_bin, TestContext};
|
use crate::common::TestContext;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
/// Create a `pip check` command with options shared across scenarios.
|
|
||||||
fn check_command(context: &TestContext) -> Command {
|
|
||||||
let mut command = Command::new(get_bin());
|
|
||||||
command.arg("pip").arg("check");
|
|
||||||
context.add_shared_args(&mut command);
|
|
||||||
command
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn check_compatible_packages() -> Result<()> {
|
fn check_compatible_packages() -> Result<()> {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
|
@ -46,7 +36,7 @@ fn check_compatible_packages() -> Result<()> {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(check_command(&context), @r###"
|
uv_snapshot!(context.pip_check(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -113,7 +103,7 @@ fn check_incompatible_packages() -> Result<()> {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(check_command(&context), @r###"
|
uv_snapshot!(context.pip_check(), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 1
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -185,7 +175,7 @@ fn check_multiple_incompatible_packages() -> Result<()> {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(check_command(&context), @r###"
|
uv_snapshot!(context.pip_check(), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 1
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command {
|
||||||
.arg(packse_index_url())
|
.arg(packse_index_url())
|
||||||
.arg("--find-links")
|
.arg("--find-links")
|
||||||
.arg(build_vendor_links_url());
|
.arg(build_vendor_links_url());
|
||||||
context.add_shared_args(&mut command);
|
context.add_shared_args(&mut command, true);
|
||||||
command.env_remove("UV_EXCLUDE_NEWER");
|
command.env_remove("UV_EXCLUDE_NEWER");
|
||||||
command.env("UV_TEST_PYTHON_PATH", python_path);
|
command.env("UV_TEST_PYTHON_PATH", python_path);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,14 @@
|
||||||
#![cfg(all(feature = "python", feature = "pypi"))]
|
#![cfg(all(feature = "python", feature = "pypi"))]
|
||||||
|
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::prelude::*;
|
||||||
use assert_fs::fixture::ChildPath;
|
use assert_fs::fixture::ChildPath;
|
||||||
use assert_fs::prelude::*;
|
use assert_fs::prelude::*;
|
||||||
|
|
||||||
use crate::common::{get_bin, uv_snapshot, TestContext};
|
use crate::common::{uv_snapshot, TestContext};
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
/// Create a `pip freeze` command with options shared across scenarios.
|
|
||||||
fn command(context: &TestContext) -> Command {
|
|
||||||
let mut command = Command::new(get_bin());
|
|
||||||
command.arg("pip").arg("freeze");
|
|
||||||
context.add_shared_args(&mut command);
|
|
||||||
command
|
|
||||||
}
|
|
||||||
|
|
||||||
/// List multiple installed packages in a virtual environment.
|
/// List multiple installed packages in a virtual environment.
|
||||||
#[test]
|
#[test]
|
||||||
fn freeze_many() -> Result<()> {
|
fn freeze_many() -> Result<()> {
|
||||||
|
|
@ -35,7 +25,7 @@ fn freeze_many() -> Result<()> {
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(command(&context)
|
uv_snapshot!(context.pip_freeze()
|
||||||
.arg("--strict"), @r###"
|
.arg("--strict"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -87,7 +77,7 @@ fn freeze_duplicate() -> Result<()> {
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context1.filters(), command(&context1).arg("--strict"), @r###"
|
uv_snapshot!(context1.filters(), context1.pip_freeze().arg("--strict"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -120,7 +110,7 @@ fn freeze_url() -> Result<()> {
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(command(&context)
|
uv_snapshot!(context.pip_freeze()
|
||||||
.arg("--strict"), @r###"
|
.arg("--strict"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -158,7 +148,7 @@ fn freeze_with_editable() -> Result<()> {
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context.filters(), command(&context)
|
uv_snapshot!(context.filters(), context.pip_freeze()
|
||||||
.arg("--strict"), @r###"
|
.arg("--strict"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -173,7 +163,7 @@ fn freeze_with_editable() -> Result<()> {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Exclude editable package.
|
// Exclude editable package.
|
||||||
uv_snapshot!(context.filters(), command(&context)
|
uv_snapshot!(context.filters(), context.pip_freeze()
|
||||||
.arg("--exclude-editable")
|
.arg("--exclude-editable")
|
||||||
.arg("--strict"), @r###"
|
.arg("--strict"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -230,7 +220,7 @@ fn freeze_with_egg_info() -> Result<()> {
|
||||||
.write_str("")?;
|
.write_str("")?;
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context.filters(), command(&context), @r###"
|
uv_snapshot!(context.filters(), context.pip_freeze(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -283,7 +273,7 @@ fn freeze_with_egg_info_no_py() -> Result<()> {
|
||||||
.write_str("")?;
|
.write_str("")?;
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context.filters(), command(&context), @r###"
|
uv_snapshot!(context.filters(), context.pip_freeze(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -320,7 +310,7 @@ fn freeze_with_egg_info_file() -> Result<()> {
|
||||||
"})?;
|
"})?;
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context.filters(), command(&context), @r###"
|
uv_snapshot!(context.filters(), context.pip_freeze(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -358,7 +348,7 @@ Version: 0.22.0
|
||||||
.write_str(target.path().to_str().unwrap())?;
|
.write_str(target.path().to_str().unwrap())?;
|
||||||
|
|
||||||
// Run `pip freeze`.
|
// Run `pip freeze`.
|
||||||
uv_snapshot!(context.filters(), command(&context), @r###"
|
uv_snapshot!(context.filters(), context.pip_freeze(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ fn command(context: &TestContext) -> Command {
|
||||||
.arg(packse_index_url())
|
.arg(packse_index_url())
|
||||||
.arg("--find-links")
|
.arg("--find-links")
|
||||||
.arg(build_vendor_links_url());
|
.arg(build_vendor_links_url());
|
||||||
context.add_shared_args(&mut command);
|
context.add_shared_args(&mut command, true);
|
||||||
command.env_remove("UV_EXCLUDE_NEWER");
|
command.env_remove("UV_EXCLUDE_NEWER");
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assert_fs::fixture::ChildPath;
|
use assert_fs::fixture::ChildPath;
|
||||||
use assert_fs::fixture::FileWriteStr;
|
use assert_fs::fixture::FileWriteStr;
|
||||||
|
|
@ -8,22 +6,15 @@ use assert_fs::prelude::*;
|
||||||
|
|
||||||
use common::uv_snapshot;
|
use common::uv_snapshot;
|
||||||
|
|
||||||
use crate::common::{get_bin, TestContext};
|
use crate::common::TestContext;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
fn list_command(context: &TestContext) -> Command {
|
|
||||||
let mut command = Command::new(get_bin());
|
|
||||||
command.arg("pip").arg("list");
|
|
||||||
context.add_shared_args(&mut command);
|
|
||||||
command
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn list_empty_columns() {
|
fn list_empty_columns() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
|
||||||
uv_snapshot!(list_command(&context)
|
uv_snapshot!(context.pip_list()
|
||||||
.arg("--format")
|
.arg("--format")
|
||||||
.arg("columns"), @r###"
|
.arg("columns"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -39,7 +30,7 @@ fn list_empty_columns() {
|
||||||
fn list_empty_freeze() {
|
fn list_empty_freeze() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
|
||||||
uv_snapshot!(list_command(&context)
|
uv_snapshot!(context.pip_list()
|
||||||
.arg("--format")
|
.arg("--format")
|
||||||
.arg("freeze"), @r###"
|
.arg("freeze"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -55,7 +46,7 @@ fn list_empty_freeze() {
|
||||||
fn list_empty_json() {
|
fn list_empty_json() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
|
||||||
uv_snapshot!(list_command(&context)
|
uv_snapshot!(context.pip_list()
|
||||||
.arg("--format")
|
.arg("--format")
|
||||||
.arg("json"), @r###"
|
.arg("json"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -93,7 +84,7 @@ fn list_single_no_editable() -> Result<()> {
|
||||||
|
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
uv_snapshot!(list_command(&context), @r###"
|
uv_snapshot!(context.pip_list(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -137,7 +128,7 @@ fn list_editable() {
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context), @r###"
|
uv_snapshot!(filters, context.pip_list(), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -182,7 +173,7 @@ fn list_editable_only() {
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--editable"), @r###"
|
.arg("--editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -195,7 +186,7 @@ fn list_editable_only() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--exclude-editable"), @r###"
|
.arg("--exclude-editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -210,7 +201,7 @@ fn list_editable_only() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--editable")
|
.arg("--editable")
|
||||||
.arg("--exclude-editable"), @r###"
|
.arg("--exclude-editable"), @r###"
|
||||||
success: false
|
success: false
|
||||||
|
|
@ -256,7 +247,7 @@ fn list_exclude() {
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--exclude")
|
.arg("--exclude")
|
||||||
.arg("numpy"), @r###"
|
.arg("numpy"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -273,7 +264,7 @@ fn list_exclude() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--exclude")
|
.arg("--exclude")
|
||||||
.arg("poetry-editable"), @r###"
|
.arg("poetry-editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -289,7 +280,7 @@ fn list_exclude() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--exclude")
|
.arg("--exclude")
|
||||||
.arg("numpy")
|
.arg("numpy")
|
||||||
.arg("--exclude")
|
.arg("--exclude")
|
||||||
|
|
@ -338,7 +329,7 @@ fn list_format_json() {
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=json"), @r###"
|
.arg("--format=json"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -349,7 +340,7 @@ fn list_format_json() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=json")
|
.arg("--format=json")
|
||||||
.arg("--editable"), @r###"
|
.arg("--editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -361,7 +352,7 @@ fn list_format_json() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=json")
|
.arg("--format=json")
|
||||||
.arg("--exclude-editable"), @r###"
|
.arg("--exclude-editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -404,7 +395,7 @@ fn list_format_freeze() {
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=freeze"), @r###"
|
.arg("--format=freeze"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -418,7 +409,7 @@ fn list_format_freeze() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=freeze")
|
.arg("--format=freeze")
|
||||||
.arg("--editable"), @r###"
|
.arg("--editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -430,7 +421,7 @@ fn list_format_freeze() {
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--format=freeze")
|
.arg("--format=freeze")
|
||||||
.arg("--exclude-editable"), @r###"
|
.arg("--exclude-editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -481,7 +472,7 @@ Version: 0.22.0
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--editable"), @r###"
|
.arg("--editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -524,7 +515,7 @@ Version: 0.1-bulbasaur
|
||||||
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
.chain(vec![(r"\-\-\-\-\-\-+.*", "[UNDERLINE]"), (" +", " ")])
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
uv_snapshot!(filters, list_command(&context)
|
uv_snapshot!(filters, context.pip_list()
|
||||||
.arg("--editable"), @r###"
|
.arg("--editable"), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 2
|
exit_code: 2
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
use std::env::current_dir;
|
use std::env::current_dir;
|
||||||
use std::process::Command;
|
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::prelude::*;
|
||||||
|
|
@ -9,22 +8,15 @@ use indoc::indoc;
|
||||||
|
|
||||||
use common::uv_snapshot;
|
use common::uv_snapshot;
|
||||||
|
|
||||||
use crate::common::{get_bin, TestContext};
|
use crate::common::TestContext;
|
||||||
|
|
||||||
mod common;
|
mod common;
|
||||||
|
|
||||||
fn show_command(context: &TestContext) -> Command {
|
|
||||||
let mut command = Command::new(get_bin());
|
|
||||||
command.arg("pip").arg("show");
|
|
||||||
context.add_shared_args(&mut command);
|
|
||||||
command
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn show_empty() {
|
fn show_empty() {
|
||||||
let context = TestContext::new("3.12");
|
let context = TestContext::new("3.12");
|
||||||
|
|
||||||
uv_snapshot!(show_command(&context), @r###"
|
uv_snapshot!(context.pip_show(), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 1
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
@ -64,7 +56,7 @@ fn show_requires_multiple() -> Result<()> {
|
||||||
);
|
);
|
||||||
|
|
||||||
context.assert_command("import requests").success();
|
context.assert_command("import requests").success();
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("requests"), @r###"
|
.arg("requests"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -115,7 +107,7 @@ fn show_python_version_marker() -> Result<()> {
|
||||||
filters.push(("Requires: colorama", "Requires:"));
|
filters.push(("Requires: colorama", "Requires:"));
|
||||||
}
|
}
|
||||||
|
|
||||||
uv_snapshot!(filters, show_command(&context)
|
uv_snapshot!(filters, context.pip_show()
|
||||||
.arg("click"), @r###"
|
.arg("click"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -159,7 +151,7 @@ fn show_found_single_package() -> Result<()> {
|
||||||
|
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("markupsafe"), @r###"
|
.arg("markupsafe"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -208,7 +200,7 @@ fn show_found_multiple_packages() -> Result<()> {
|
||||||
|
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("markupsafe")
|
.arg("markupsafe")
|
||||||
.arg("pip"), @r###"
|
.arg("pip"), @r###"
|
||||||
success: true
|
success: true
|
||||||
|
|
@ -264,7 +256,7 @@ fn show_found_one_out_of_three() -> Result<()> {
|
||||||
|
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("markupsafe")
|
.arg("markupsafe")
|
||||||
.arg("flask")
|
.arg("flask")
|
||||||
.arg("django"), @r###"
|
.arg("django"), @r###"
|
||||||
|
|
@ -317,7 +309,7 @@ fn show_found_one_out_of_two_quiet() -> Result<()> {
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
// Flask isn't installed, but markupsafe is, so the command should succeed.
|
// Flask isn't installed, but markupsafe is, so the command should succeed.
|
||||||
uv_snapshot!(show_command(&context)
|
uv_snapshot!(context.pip_show()
|
||||||
.arg("markupsafe")
|
.arg("markupsafe")
|
||||||
.arg("flask")
|
.arg("flask")
|
||||||
.arg("--quiet"), @r###"
|
.arg("--quiet"), @r###"
|
||||||
|
|
@ -364,7 +356,7 @@ fn show_empty_quiet() -> Result<()> {
|
||||||
context.assert_command("import markupsafe").success();
|
context.assert_command("import markupsafe").success();
|
||||||
|
|
||||||
// Flask isn't installed, so the command should fail.
|
// Flask isn't installed, so the command should fail.
|
||||||
uv_snapshot!(show_command(&context)
|
uv_snapshot!(context.pip_show()
|
||||||
.arg("flask")
|
.arg("flask")
|
||||||
.arg("--quiet"), @r###"
|
.arg("--quiet"), @r###"
|
||||||
success: false
|
success: false
|
||||||
|
|
@ -395,7 +387,7 @@ fn show_editable() -> Result<()> {
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("poetry-editable"), @r###"
|
.arg("poetry-editable"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
@ -451,7 +443,7 @@ fn show_required_by_multiple() -> Result<()> {
|
||||||
context.assert_command("import requests").success();
|
context.assert_command("import requests").success();
|
||||||
|
|
||||||
// idna is required by anyio and requests
|
// idna is required by anyio and requests
|
||||||
uv_snapshot!(context.filters(), show_command(&context)
|
uv_snapshot!(context.filters(), context.pip_show()
|
||||||
.arg("idna"), @r###"
|
.arg("idna"), @r###"
|
||||||
success: true
|
success: true
|
||||||
exit_code: 0
|
exit_code: 0
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ fn command(context: &TestContext, python_versions: &[&str]) -> Command {
|
||||||
.arg(packse_index_url())
|
.arg(packse_index_url())
|
||||||
.arg("--find-links")
|
.arg("--find-links")
|
||||||
.arg(build_vendor_links_url());
|
.arg(build_vendor_links_url());
|
||||||
context.add_shared_args(&mut command);
|
context.add_shared_args(&mut command, true);
|
||||||
command.env_remove("UV_EXCLUDE_NEWER");
|
command.env_remove("UV_EXCLUDE_NEWER");
|
||||||
command.env("UV_TEST_PYTHON_PATH", python_path);
|
command.env("UV_TEST_PYTHON_PATH", python_path);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ fn command(context: &TestContext) -> Command {
|
||||||
.arg(packse_index_url())
|
.arg(packse_index_url())
|
||||||
.arg("--find-links")
|
.arg("--find-links")
|
||||||
.arg(build_vendor_links_url());
|
.arg(build_vendor_links_url());
|
||||||
context.add_shared_args(&mut command);
|
context.add_shared_args(&mut command, true);
|
||||||
command.env_remove("UV_EXCLUDE_NEWER");
|
command.env_remove("UV_EXCLUDE_NEWER");
|
||||||
command
|
command
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue