Commit 83c7b43e authored by Mikaël Salson's avatar Mikaël Salson

algo/tests/testRepresentative: More reproducible test

Reset the seed to have the same conditions. Otherwise depending on the number of tests and the number of times
the pseudo-random generator has been used the test may fail or succeed (we are using a RandomScore now)
parent e908c98b
Pipeline #140853 failed with stages
in 2 minutes and 14 seconds
......@@ -57,6 +57,7 @@ void testRepresentative() {
void testRevcompRepresentative() {
list<Sequence> reads = BioReader("data/representative_revcomp.fq").getAll();
srand(1);
KmerRepresentativeComputer krc(reads, "##############");
krc.setOptions(false, 3, 0.5);
krc.setCoverageReferenceLength(50);
......@@ -69,6 +70,7 @@ void testRevcompRepresentative() {
it->sequence = revcomp(it->sequence);
}
srand(1);
KmerRepresentativeComputer krc2(reads, "##############");
krc2.setOptions(false, 3, 0.5);
krc2.setCoverageReferenceLength(50);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment