Skip to content

Commit

Permalink
#91 NA-50 added Domain test in case write_kml_image
Browse files Browse the repository at this point in the history
  • Loading branch information
jeong1park committed Jan 15, 2018
1 parent 1c0b509 commit 3fcdddc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions nansat/tests/test_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,22 @@ def test_write_kml_image_from_no_klmFileName(self):
d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
with self.assertRaises(OptionError):
d.write_kml_image(
klmFileName=None,
kmlFigureName=os.path.join(ntd.tmp_data_path, 'gcps.tif'))
kmlFileName=None,
kmlFigureName=os.path.join(ntd.tmp_data_path, 'stere.tif'))

def test_write_kml_image_from_no_klmFigureName(self):
d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
with self.assertRaises(OptionError):
d.write_kml_image(
klmFileName=os.path.join(ntd.tmp_data_path, 'domain_write_kml_image.klm'),
kmlFileName=os.path.join(ntd.tmp_data_path, 'domain_write_kml_image.klm'),
kmlFigureName=None)

def test_write_kml_image(self):
d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
klmFileName=os.path.join(ntd.tmp_data_path, 'domain_write_kml_image.klm')
kmlFigureName=os.path.join(ntd.tmp_data_path, 'gcps.tif')
d.write_kml_image(klmFileName=klmFileName, kmlFigureName=kmlFigureName)
self.assertTrue(os.path.exists(klmFileName))

kmlFileName=os.path.join(ntd.tmp_data_path, 'domain_write_kml_image.klm')
kmlFigureName=os.path.join(ntd.tmp_data_path, 'stere.tif')
d.write_kml_image(kmlFileName=kmlFileName, kmlFigureName=kmlFigureName)
self.assertTrue(os.path.exists(kmlFileName))

def test_get_geolocation_grids(self):
d = Domain(4326, "-te 25 70 35 72 -ts 500 500")
Expand Down

0 comments on commit 3fcdddc

Please sign in to comment.