Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Nov 22, 2024
1 parent e73a240 commit dd27da7
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ struct Options {
#[fixture]
fn options(#[default("simple-example")] project: String) -> Options {
let output_dir = tempdir().unwrap();
eprintln!("Output dir: {:?}", output_dir.path());
let _ = output_dir.path().to_path_buf();

// copy pixi.toml and pixi.lock to temporary location
let pixi_toml = output_dir.path().join("pixi.toml");
Expand Down Expand Up @@ -95,21 +93,11 @@ async fn test_install_twice(options: Options) {
}

#[rstest]
#[case("already-installed-different-version".to_string())]
#[case("already-installed".to_string())]
#[tokio::test]
async fn test_already_installed(#[with("already-installed".to_string())] options: Options) {
let result = pixi_inject::pixi_inject(options.prefix.clone(), options.package).await;
assert!(result.is_err());
assert!(result
.err()
.unwrap()
.to_string()
.contains("Some of the packages are already installed: pydantic-core"))
}

#[rstest]
#[tokio::test]
async fn test_already_installed_different_version(
#[with("already-installed-different-version".to_string())] options: Options,
async fn test_already_installed(
#[case] _project: String, #[with(_project.clone())] options: Options,
) {
let result = pixi_inject::pixi_inject(options.prefix.clone(), options.package).await;
assert!(result.is_err());
Expand Down

0 comments on commit dd27da7

Please sign in to comment.