diff --git a/tests/.ipynb_checkpoints/test_image-checkpoint.py b/tests/.ipynb_checkpoints/test_image-checkpoint.py index eddb59a5..67961fcb 100755 --- a/tests/.ipynb_checkpoints/test_image-checkpoint.py +++ b/tests/.ipynb_checkpoints/test_image-checkpoint.py @@ -10,32 +10,34 @@ L5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR').first() L4 = ee.ImageCollection('LANDSAT/LT04/C01/T1_SR').first() +indices = ['NDVI','BAIS2'] + class Test(unittest.TestCase): """Tests for `eemont` package.""" def test_S2(self): """Test the image module for Sentinel-2""" - S2_tested = S2.maskClouds().scale().index() + S2_tested = S2.maskClouds().scale().index(indices) self.assertIsInstance(S2_tested, ee.image.Image) def test_L8(self): """Test the image module for Landsat 8""" - L8_tested = L8.maskClouds().scale().index() + L8_tested = L8.maskClouds().scale().index(indices) self.assertIsInstance(L8_tested, ee.image.Image) def test_L7(self): """Test the image module for Landsat 7""" - L7_tested = L7.maskClouds().scale().index() + L7_tested = L7.maskClouds().scale().index(indices) self.assertIsInstance(L7_tested, ee.image.Image) def test_L5(self): """Test the image module for Landsat 5""" - L5_tested = L5.maskClouds().scale().index() + L5_tested = L5.maskClouds().scale().index(indices) self.assertIsInstance(L5_tested, ee.image.Image) def test_L4(self): """Test the image module for Landsat 4""" - L4_tested = L4.maskClouds().scale().index() + L4_tested = L4.maskClouds().scale().index(indices) self.assertIsInstance(L4_tested, ee.image.Image) if __name__ == '__main__': diff --git a/tests/test_image.py b/tests/test_image.py index eddb59a5..67961fcb 100755 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -10,32 +10,34 @@ L5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR').first() L4 = ee.ImageCollection('LANDSAT/LT04/C01/T1_SR').first() +indices = ['NDVI','BAIS2'] + class Test(unittest.TestCase): """Tests for `eemont` package.""" def test_S2(self): """Test the image module for Sentinel-2""" - S2_tested = S2.maskClouds().scale().index() + S2_tested = S2.maskClouds().scale().index(indices) self.assertIsInstance(S2_tested, ee.image.Image) def test_L8(self): """Test the image module for Landsat 8""" - L8_tested = L8.maskClouds().scale().index() + L8_tested = L8.maskClouds().scale().index(indices) self.assertIsInstance(L8_tested, ee.image.Image) def test_L7(self): """Test the image module for Landsat 7""" - L7_tested = L7.maskClouds().scale().index() + L7_tested = L7.maskClouds().scale().index(indices) self.assertIsInstance(L7_tested, ee.image.Image) def test_L5(self): """Test the image module for Landsat 5""" - L5_tested = L5.maskClouds().scale().index() + L5_tested = L5.maskClouds().scale().index(indices) self.assertIsInstance(L5_tested, ee.image.Image) def test_L4(self): """Test the image module for Landsat 4""" - L4_tested = L4.maskClouds().scale().index() + L4_tested = L4.maskClouds().scale().index(indices) self.assertIsInstance(L4_tested, ee.image.Image) if __name__ == '__main__': diff --git a/tests/test_imagecollection.py b/tests/test_imagecollection.py index d2267169..341f5ccd 100755 --- a/tests/test_imagecollection.py +++ b/tests/test_imagecollection.py @@ -12,32 +12,34 @@ L5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR').filterBounds(point) L4 = ee.ImageCollection('LANDSAT/LT04/C01/T1_SR').filterBounds(point) +indices = ['NDVI','BAIS2'] + class Test(unittest.TestCase): """Tests for `eemont` package.""" def test_S2(self): - """Test the image module for Sentinel-2""" - S2_tested = S2.closest('2020-01-15').maskClouds().scale().index() + """Test the image collection module for Sentinel-2""" + S2_tested = S2.closest('2020-01-15').maskClouds().scale().index(indices) self.assertIsInstance(S2_tested, ee.imagecollection.ImageCollection) def test_L8(self): - """Test the image module for Landsat 8""" - L8_tested = L8.closest('2020-01-15').maskClouds().scale().index() + """Test the image collection module for Landsat 8""" + L8_tested = L8.closest('2020-01-15').maskClouds().scale().index(indices) self.assertIsInstance(L8_tested, ee.imagecollection.ImageCollection) def test_L7(self): - """Test the image module for Landsat 7""" - L7_tested = L7.closest('2010-01-15').maskClouds().scale().index() + """Test the image collection module for Landsat 7""" + L7_tested = L7.closest('2010-01-15').maskClouds().scale().index(indices) self.assertIsInstance(L7_tested, ee.imagecollection.ImageCollection) def test_L5(self): - """Test the image module for Landsat 5""" - L5_tested = L5.closest('2000-01-15').maskClouds().scale().index() + """Test the image collection module for Landsat 5""" + L5_tested = L5.closest('2000-01-15').maskClouds().scale().index(indices) self.assertIsInstance(L5_tested, ee.imagecollection.ImageCollection) def test_L4(self): - """Test the image module for Landsat 4""" - L4_tested = L4.closest('1990-01-15').maskClouds().scale().index() + """Test the image collection module for Landsat 4""" + L4_tested = L4.closest('1990-01-15').maskClouds().scale().index(indices) self.assertIsInstance(L4_tested, ee.imagecollection.ImageCollection) if __name__ == '__main__':