From 695f6437c448db6a592c3a6a2d6b38c625b4c194 Mon Sep 17 00:00:00 2001 From: jatin mahajan Date: Fri, 2 Aug 2024 15:58:05 -0400 Subject: [PATCH] chore: Update install_package function to use "latest" as default version --- tests/integration_tests.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 8747d96..d9efa0b 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -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]