Skip to content

Commit

Permalink
add test for modis_tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Pesendorfer committed Apr 9, 2019
1 parent 38ed705 commit 68f18ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_modis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from osgeo import gdal

import fake
from modape.modis import ModisQuery, ModisRawH5, ModisSmoothH5
from modape.modis import ModisQuery, ModisRawH5, ModisSmoothH5, modis_tiles

def create_gdal(x, y):
"""Create in-memory gdal dataset for testing.
Expand Down Expand Up @@ -253,5 +253,10 @@ def test_smoothHDF5(self):
os.remove('MOD11C2.006.LTD.h5')
os.remove('MOD11C2.006.txp.LTD.h5')

def test_modis_tiles(self):
"""Test modis_tiles."""
tiles = modis_tiles([12, 19, 29, 1]) # xmin, ymax, xmax, ymin
self.assertEqual(tiles, ['h19v07', 'h19v08', 'h20v07', 'h20v08'])

if __name__ == '__main__':
unittest.main()

0 comments on commit 68f18ff

Please sign in to comment.