From b617ed4e78072e7dfa1715cd115eed1217505778 Mon Sep 17 00:00:00 2001
From: Martin Larralde <martin.larralde@embl.de>
Date: Fri, 21 Jun 2024 11:28:22 +0200
Subject: [PATCH] Rename unit tests in `lightmotif` for consistency

---
 lightmotif/src/abc.rs     | 2 +-
 lightmotif/src/dense.rs   | 8 ++++----
 lightmotif/src/pli/mod.rs | 2 +-
 lightmotif/src/scan.rs    | 4 ++--
 lightmotif/src/scores.rs  | 2 +-
 lightmotif/src/seq.rs     | 8 ++++----
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lightmotif/src/abc.rs b/lightmotif/src/abc.rs
index 217d1d9..a396880 100644
--- a/lightmotif/src/abc.rs
+++ b/lightmotif/src/abc.rs
@@ -556,7 +556,7 @@ mod test {
     use super::*;
 
     #[test]
-    fn test_background_new() {
+    fn background_new() {
         assert!(Background::<Dna>::new([0.3, 0.2, 0.2, 0.3, 0.0]).is_ok());
         assert!(Background::<Dna>::new([0.1, 0.1, 0.1, 0.1, 0.0]).is_err());
     }
diff --git a/lightmotif/src/dense.rs b/lightmotif/src/dense.rs
index 6b3b6d8..351a371 100644
--- a/lightmotif/src/dense.rs
+++ b/lightmotif/src/dense.rs
@@ -459,7 +459,7 @@ mod test {
     use super::*;
 
     #[test]
-    fn test_stride() {
+    fn stride() {
         let d1 = DenseMatrix::<u8, U32, U32>::new(0);
         assert_eq!(d1.stride(), 32);
 
@@ -483,7 +483,7 @@ mod test {
     }
 
     #[test]
-    fn test_resize() {
+    fn resize() {
         let mut dense = DenseMatrix::<u64, U32>::new(4);
 
         for i in 0..4 {
@@ -511,7 +511,7 @@ mod test {
     }
 
     #[test]
-    fn test_iter_mut() {
+    fn iter_mut() {
         let mut dense = DenseMatrix::<u64, U32>::new(4);
         for i in 0..4 {
             dense[i][0] = (i + 1) as u64;
@@ -531,7 +531,7 @@ mod test {
     }
 
     #[test]
-    fn test_index_matrix_coordinates() {
+    fn index_matrix_coordinates() {
         let mut dense = DenseMatrix::<u64, U32>::new(4);
         for i in 0..4 {
             dense[i][0] = (i + 1) as u64;
diff --git a/lightmotif/src/pli/mod.rs b/lightmotif/src/pli/mod.rs
index 2a8d120..1a5f57f 100644
--- a/lightmotif/src/pli/mod.rs
+++ b/lightmotif/src/pli/mod.rs
@@ -605,7 +605,7 @@ mod test {
     use crate::pwm::CountMatrix;
 
     #[test]
-    fn test_score_rows_into_empty() {
+    fn score_rows_into_empty() {
         let pli = Pipeline::generic();
 
         let seq = EncodedSequence::<Dna>::from_str("ATGCA").unwrap();
diff --git a/lightmotif/src/scan.rs b/lightmotif/src/scan.rs
index e4c9430..726ed80 100644
--- a/lightmotif/src/scan.rs
+++ b/lightmotif/src/scan.rs
@@ -227,7 +227,7 @@ mod test {
     }
 
     #[test]
-    fn test_collect() {
+    fn collect() {
         let pssm = self::pssm();
         let mut striped = self::seq();
         striped.configure(&pssm);
@@ -245,7 +245,7 @@ mod test {
     }
 
     #[test]
-    fn test_max() {
+    fn max() {
         let pssm = self::pssm();
         let mut striped = self::seq();
         striped.configure(&pssm);
diff --git a/lightmotif/src/scores.rs b/lightmotif/src/scores.rs
index 8ad440b..380d7d2 100644
--- a/lightmotif/src/scores.rs
+++ b/lightmotif/src/scores.rs
@@ -278,7 +278,7 @@ mod tests {
     use crate::num::U4;
 
     #[test]
-    fn test_iter() {
+    fn iter() {
         let data = DenseMatrix::<f32, U4>::new(6);
         let scores = StripedScores::new(data, 22).unwrap();
         assert_eq!(scores.unstripe().len(), 22);
diff --git a/lightmotif/src/seq.rs b/lightmotif/src/seq.rs
index 1880de4..85e4646 100644
--- a/lightmotif/src/seq.rs
+++ b/lightmotif/src/seq.rs
@@ -350,7 +350,7 @@ mod test {
     use crate::abc::Nucleotide::*;
 
     #[test]
-    fn test_empty() {
+    fn empty() {
         let seq = EncodedSequence::<Dna>::from_str("").unwrap();
 
         let pli = Pipeline::generic();
@@ -362,7 +362,7 @@ mod test {
     }
 
     #[test]
-    fn test_stripe() {
+    fn stripe() {
         let pli = Pipeline::generic();
 
         let seq = EncodedSequence::<Dna>::from_str("ATGCA").unwrap();
@@ -379,7 +379,7 @@ mod test {
     }
 
     #[test]
-    fn test_configure_wrap() {
+    fn configure_wrap() {
         let pli = Pipeline::generic();
 
         let seq = EncodedSequence::<Dna>::from_str("ATGCA").unwrap();
@@ -396,7 +396,7 @@ mod test {
     }
 
     #[test]
-    fn test_index() {
+    fn index() {
         let pli = Pipeline::generic();
 
         let seq = EncodedSequence::<Dna>::from_str("ATGCA").unwrap();
-- 
GitLab