Applied-GeoSolutions / gips

Geospatial Image Processing System
GNU General Public License v3.0
17 stars 5 forks source link

unit tests should pass, and not be sensitive to GIPS_ORM #459

Closed ra-tolson closed 6 years ago

ra-tolson commented 6 years ago

I did this (leaving out chirps due to issue #458):

$ time GIPS_ORM=false pytest -k 'not chirps' &>no-chirps-orm-false
$ time GIPS_ORM=true pytest -k 'not chirps' &>no-chirps-orm-true
$ diff -u no-chirps-orm-false no-chirps-orm-true | head -n 20
--- no-chirps-orm-false 2017-11-28 12:42:42.029613274 -0500
+++ no-chirps-orm-true  2017-11-28 12:42:42.037613481 -0500
@@ -19,14 +19,14 @@
 gips/test/sys/t_script_invocation.py s
 gips/test/sys/t_sentinel2.py ssssss
 gips/test/unit/t_cdl.py ...
-gips/test/unit/t_core.py .FFFs.......
+gips/test/unit/t_core.py ....s.......
 gips/test/unit/t_daymet.py ..........
 gips/test/unit/t_dbinv_api.py s...........
 gips/test/unit/t_dbinv_models.py ..
-gips/test/unit/t_inventory.py FF
+gips/test/unit/t_inventory.py ..
 gips/test/unit/t_inventory_settings.py ..
 gips/test/unit/t_landsat.py ....
-gips/test/unit/t_modis_asset.py ...........................F
+gips/test/unit/t_modis_asset.py ............................
 gips/test/unit/t_modis_fetch.py ......
 gips/test/unit/t_orm.py ....................
 gips/test/unit/t_sentinel2.py ..

So it looks like, first of all, test outcomes vary depending on an environment variable; unit tests should Just Work, one shouldn't have to do anything but emplace pytest.ini.

Secondly unit tests should be kept in a passing state or else marked as skipped or else expected failures; best case, here, three tests still fail: gips/test/int/t_core.py .FFF.