Skip to content

Commit

Permalink
chore: Update install_package function to use "latest" as default ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
jatin711-debug committed Aug 2, 2024
1 parent de75c8a commit 695f643
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ fn test_save_packages() {
#[test]
fn test_install_package() {
let dir = tempdir().expect("Failed to create temp dir");
let file_path = dir.path().join("requirements.json");
let file_path: std::path::PathBuf = dir.path().join("requirements.json");
fs::write(&file_path, "{}").expect("Failed to write to temp file");
let mut packages = PackageRegistry::new();
install_package("pandas", Some("1.0.0"), &mut packages);
install_package("pandas", Some("latest"), &mut packages);
save_packages_to_path(&packages, &file_path);
let updated_packages = load_packages_from_path(&file_path);
assert_eq!(updated_packages.packages.get("pandas").unwrap(), "1.0.0");
assert_eq!(updated_packages.packages.get("pandas").unwrap(), "latest");
}

#[test]
Expand Down

0 comments on commit 695f643

Please sign in to comment.