Closed ra-tolson closed 6 years ago
I tried the stats test without an output dir and then with one, but I couldn't make multiple stats files show up in a single expectation block. What I got was normal expectations for the first run, then empty lists for the second.
Is there anything else I need to know about reproducing the problem you're having?
Empty lists for the second one is more the problem. Doesn't it seem so?
I think that I ran pytest ... -k modis
so it probably did a t_project
before it did the first test (hence the other tiffs).
Okay, now I see what's going on: There's a fix for the cross-test pollution problem in the next branch after this one; sorry I forgot that it wasn't in this one.
Speaking of which, do you mind if we put off cleanup implementation, if any is to be done, for after the next branch? I'd rather implement new stuff on top of the latest commit to avoid needing to merge things. The next branch has also prism & sentinel2 conversion and ways to do --sys
and --slow
.
This fixes #464, fixes #467, and makes progress on #483 and #468.
New option,
--record=filename
, that puts the system tests into recording mode. In this mode the tests always pass, and record new expectations in the given filename. The expectations can then be copied into place for future test runs.Tests are refactored to work across drivers rather than one test file per driver; this substantially reduces boilerplate. So
t_project.py
runs projection tests for modis, merra, and aod. Three tests are done this way: t_process, t_project, and t_stats, for the three drivers mentioned. Porting the remaining drivers is the next task.In
util.py
several new functions support the new testing apparatus. They duplicate bits of the old system test infrastructure, but without relying on scripttest. It was unfortunately too hard to modify existing code without rewriting everything.A new file
driver_setup.py
, has a common setup function for downloading assets for any given driver.A little maintenance was done on testing generally:
t_chirps
got a fix, andt_version_override
was removed since it was broken and soon it won't be necessary to override the GIPS version anyway.Several expectations and test files were trimmed as tests moved and were dropped. In particular
t_inventory
andt_info
aren't considered worthy, so they got removed from all drivers.