Closed javerbukh closed 5 years ago
Merging #529 into master will increase coverage by
0.17%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #529 +/- ##
==========================================
+ Coverage 64.16% 64.33% +0.17%
==========================================
Files 39 40 +1
Lines 4956 4980 +24
==========================================
+ Hits 3180 3204 +24
Misses 1776 1776
Impacted Files | Coverage Δ | |
---|---|---|
cubeviz/tests/test_image_viewer.py | 100% <100%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 861d9d3...9081704. Read the comment docs.
@javerbukh There are a lot of levels of what could be compared here.
I think it might be better to create the ROI and grab the text of the number at the bottom of the viewer. Then compare that text, represented as a floating point number, to the actual expected number.
This way we are testing the actual number people will use to what we expect. It is that number which they might use for science or for interpreting science, so I think we should check it. Does that make sense?
I like this test. Funny, I would have tried parsing the string to get the numbers, and then compare the numbers etc etc, this is so much simpler and better. :)
The current test checks to see that the data presented in the image viewer stats area is parsed correctly. However, the original code uses many different parameters and functions in order to work, so it was difficult to write tests without using some of the image_viewer functions. Any recommended changes or improvements are welcome.
Resolves #513