Open winni2k opened 4 years ago
I guess all we really need is a sufficient number of test sequences with known and acceptable alignments. This is all the test is really doing, albeit in a kinda lazy way. Shall I just replace it with a fixed set of sequences and alignments?
Yes! That would be perfect!
We are just trying to make sure the machinery is broadly working with the acceptance tests.
In fact, is there a particular reason why the sequences are 100, 200, and 500 bases long?
In an ideal world I would instead like to see some corner case lengths. Perhaps 1,2, and 10 or 100 bases long? In that case we could probably calculate the exact probability of each Viterbi path by hand, no? But this is probably not that important right now.
I was trying to refactor https://github.com/castcollab/tesserae2/blob/master/tests/acceptance/test_tesserae.py#L11, but the acceptance tests would fail if I replaced
random.choice
withrandom.choices
.choices
uses a different randomization thanchoice
. Could that be the cause, @kvg? And a related question: Why do we need to set the seed here: https://github.com/castcollab/tesserae2/blob/master/tests/acceptance/test_tesserae.py#L20Depending on a seed for tests is difficult to work with because it essentially bars that code from being refactored in ways that break the randomization scheme.