Conversation
|
PS: Letting the |
| * eukaryote. The Ideogram component can be used to compare | ||
| * homologous features between chromosomes, and depict | ||
| * haploid, diploid, aneuploidy genomes. It can also display | ||
| * haploid, diploid, aneuploid genomes. It can also display |
There was a problem hiding this comment.
Words like these make me remember why I switched my major from biochem 🤣
| # assert 22 chromosomes + X and Y chromosomes | ||
| num_chromosoms = len(wait_for_elements_by_css_selector(driver, '.chromosome')) | ||
| assert num_chromosoms == 24 | ||
| chromosomes = wait_for_elements_by_css_selector(driver, '.chromosome') |
There was a problem hiding this comment.
Is there a particular reason that you changed these? (I'm just wondering if it somehow speeds things up, or ensures that we have a result before trying to test the assertion)
There was a problem hiding this comment.
I think it is to standardize the tests?
There was a problem hiding this comment.
For both reasons: standardize and get elements before taking their length (for possible debugging too).
| # assert the presence of homology region | ||
| regions = wait_for_elements_by_css_selector(driver, '.syntenicRegion') | ||
| assert len(regions) != 0 | ||
| assert len(regions) > 0 |
There was a problem hiding this comment.
Why was this changed? I guess it makes sense, since the length of a list cannot be negative, but I'm not sure this change affects performance or functionality. (Correct me if I'm wrong!)
There was a problem hiding this comment.
It shouldn't affect performance or functionality, but if ever a length was negative, I would want to catch it!! Well, I'm for writing the meaningful version directly (we expect this length to be positive, so let's write it, it's easier on the reader too).
Adresses #260.
About
Certain integration tests count (expected) elements by having Selenium find them (CSS selector). Sometimes, the underlying function times out before updated elements could be found and, hence, counted.
Description of changes
Delving into the Ideogram tests, I have standardized the finding / counting of elements. I have pushed frequently to have 'statistics' on CI test failures, and lately they haven't failed... So I'm thinking of not changing
(at least, not yet).
Before merging