diff --git a/src/cluster.rs b/src/cluster.rs index fe3634da..f7214acf 100644 --- a/src/cluster.rs +++ b/src/cluster.rs @@ -83,51 +83,3 @@ pub fn cluster( Ok(()) } - -// #[cfg(test)] -// mod tests { -// use crate::pairwise; - -// use super::*; -// use std::fs::File; -// use std::io::{BufRead, BufReader, Write}; -// use tempfile::tempdir; - -// #[test] -// fn test_cluster_jaccard() -> Result<()> { -// let mut pairwise_csv = PathBuf::from(env!("CARGO_MANIFEST_DIR")); -// pairwise_csv.push = "python/tests/test-data/cluster.pairwise.csv"; - -// let temp_dir = tempdir().unwrap(); -// let output_clusters = temp_dir.path().join("output_clusters.txt"); -// let output_clusters_str = output_clusters.to_str().unwrap().to_string(); - -// let similarity_column = String::from("jaccard"); -// let similarity_threshold = 0.5; - -// // Call your cluster function -// cluster( -// pairwise_csv, -// similarity_column, -// output_clusters_str, -// similarity_threshold, -// )?; - -// // Read and verify the output -// let file = File::open(output_clusters)?; -// let reader = BufReader::new(file); -// let mut cluster_count = 0; - -// for line in reader.lines() { -// let line = line?; -// if line.starts_with("Component") { -// cluster_count += 1; -// } -// } - -// // Verify the number of clusters is as expected -// assert_eq!(cluster_count, 2, "Expected 2 clusters"); - -// Ok(()) -// } -// }