Skip to content

Commit

Permalink
rm rust tests in favor of python tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Feb 22, 2024
1 parent 9ebef77 commit c69a6f0
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
// }
// }

0 comments on commit c69a6f0

Please sign in to comment.