Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a consistent pattern for uv add and uv remove tests #6978

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions crates/uv/tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,33 +645,17 @@ impl TestContext {
}

/// Create a `uv add` command for the given requirements.
pub fn add(&self, reqs: &[&str]) -> Command {
pub fn add(&self) -> Command {
let mut command = Command::new(get_bin());
command.arg("add").args(reqs);
self.add_shared_args(&mut command, false);
command
}

/// Create a `uv add --no-sync` command for the given requirements.
pub fn add_no_sync(&self, reqs: &[&str]) -> Command {
let mut command = Command::new(get_bin());
command.arg("add").arg("--no-sync").args(reqs);
command.arg("add");
self.add_shared_args(&mut command, false);
command
}

/// Create a `uv remove` command for the given requirements.
pub fn remove(&self, reqs: &[&str]) -> Command {
let mut command = Command::new(get_bin());
command.arg("remove").args(reqs);
self.add_shared_args(&mut command, false);
command
}

/// Create a `uv remove --no-sync` command for the given requirements.
pub fn remove_no_sync(&self, reqs: &[&str]) -> Command {
pub fn remove(&self) -> Command {
let mut command = Command::new(get_bin());
command.arg("remove").arg("--no-sync").args(reqs);
command.arg("remove");
self.add_shared_args(&mut command, false);
command
}
Expand Down
Loading
Loading