regions icon indicating copy to clipboard operation
regions copied to clipboard

Add test for PixelRegion MPL plot

Open cdeil opened this issue 7 years ago • 2 comments

This plot code is untested: https://coveralls.io/builds/18587542/source?filename=regions%2Fcore%2Fcore.py#L311

@sushobhana - It looks like you added two months ago.

Can you please add a test that executes it once?

I know that testing plotting code is hard, but a test that executes this code once is helpful even if it doesn't have any asserts, because frequently we find that code in the regions package or MPL or something else changes, and things break without us noticing. So just executing makes sure that no errors or warnings are raised. You could leave a #TODO: add asserts on output on the last line if you want to be nice to future maintainers.

You're probably aware, but you can get the coverage locally for any tests / files you like, in this case I would use

pip install pytest-cov
pytest -v --cov-report=html --cov=regions.core.core regions/core

cdeil avatar Aug 21 '18 12:08 cdeil

@sushobhana - do you have time for this, or should we move to v0.4?

cdeil avatar Sep 05 '18 18:09 cdeil

We should move it to v0.4

sushobhana avatar Sep 05 '18 18:09 sushobhana