-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests for collect and squashoutput #38
Conversation
Time consuming to test all 9 compression levels netCDF supports, and does not test our code.
Create dump file parameters as dicts, and then iterate over them calling create_dump_file().
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
===========================================
+ Coverage 10.33% 24.94% +14.61%
===========================================
Files 16 16
Lines 2312 2385 +73
Branches 472 497 +25
===========================================
+ Hits 239 595 +356
+ Misses 2063 1708 -355
- Partials 10 82 +72
Continue to review full report at Codecov.
|
One downside is that the tests are a bit slow (CI takes ~20mins), but I think that's inevitable when reading/writing to/from disk - I think it's more important to test as many arguments to |
Better practice, as assert statements are intended for tests.
What an awesome piece of work @johnomotani 🥳 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as far as I can see. Again, great work! I only got minor suggestions
Co-authored-by: Michael Løiten <michael.l.magnussen@gmail.com>
Thanks @loeiten! I think I've addressed all your comments now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great work 😃
Makes test data creation more compact and easier to read.
Adds tests for
collect()
andsquashoutput()
to the test suite. The tests cover core, SOL, single-null, connected double-null and disconnected double-null topologies (the last two aren't really different becausecollect()
doesn't need the separatrix positionsixseps1
andixseps2
, but is included for completeness - limiter topology is missing, but is not really different from core or SOL for the same reason). Thexguards
,yguards
,tind
,xind
,yind
andzind
arguments are all tested, as are thecompression
andcomplevel
arguments tosquashoutput
(which verify that we get identical data when using compression). Edit: now added tests for differentMXG
andMYG
values for one case.If anyone can see anything significant missing, please add it!