-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
src/imagery/i.sentinel1.pyrosargeocode/testsuite/test_i_sentinel1_pyrosargeocode.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
"""Test i.sentinel1.pyrosargeocode for Sentinel-1 | ||
(C) 2023 by NVE, Stefan Blumentrath and the GRASS GIS Development Team | ||
This program is free software under the GNU General Public | ||
License (>=v2). Read the file COPYING that comes with GRASS | ||
for details. | ||
:authors: Stefan Blumentrath | ||
""" | ||
import os | ||
|
||
import grass.script as gs | ||
|
||
from grass.gunittest.case import TestCase | ||
|
||
|
||
class TestPyrosarGeocoding(TestCase): | ||
"""Basic class covering all test cases""" | ||
|
||
@classmethod | ||
def setUpClass(cls): | ||
"""Initiate the working environment""" | ||
os.putenv("GRASS_OVERWRITE", "1") | ||
cls.tempdir = gs.tempdir() | ||
cls.output_dir = gs.tempdir() | ||
|
||
@classmethod | ||
def tearDownClass(cls): | ||
"""Remove the temporary data""" | ||
gs.utils.try_rmdir(cls.tempdir) | ||
|
||
def test_asf_download(self): | ||
"""Test geocoding of Sentinel-1 data with pyrosar | ||
Tests cannot succeed due to missing test data | ||
asserting fail until that is solved | ||
""" | ||
self.assertModuleFail( | ||
"i.sentinel1.pyrosargeocode", | ||
input="S1A_XXXXXXXXXXX", | ||
flags="fndm", | ||
speckle_filter="refined_lee", | ||
temporary_directory=self.tempdir, | ||
nprocs=2, | ||
elevation="DTM_10m@DTM", | ||
aoi="./data/roi.geojson", | ||
output_directory=self.output_dir, | ||
verbose=True, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
from grass.gunittest.main import test | ||
|
||
test() |