Commit 4d041ea4 authored by Niklas Keck's avatar Niklas Keck
Browse files

Fixes for implementation & tests of timeout arg.

- Fixed typo in shorthand for timeout argument
- test for ReadTimeout Exception now raises exception if ReadTimeout is
not raised
parent cafe708b
Pipeline #10174 passed with stages
in 39 minutes and 39 seconds
......@@ -919,7 +919,7 @@ if __name__ == "__main__":
help="Choose MGRS tile into which the merge of files is performed (e.g. 33UUV).")
parser.add_argument("-p", "--onlytime", action="store", required=False, type=str2bool, default=False,
help="get the available timestamps for a specific request without downloading any rasterdata")
parser.add_argument("-t", "--timeout", action="store", required=False, type=int, default=None,
parser.add_argument("-u", "--timeout", action="store", required=False, type=int, default=None,
help="time to wait for a response from gts2 before raising a Timeout exception")
args = parser.parse_args()
......@@ -382,6 +382,8 @@ class TestGts2Client(unittest.TestCase):
except ReadTimeout:
print("Test OK.")
raise Exception("Testing timeout argument failed to raise Exception")
def test_gts2_client_command_line(self):
......@@ -418,7 +420,8 @@ class TestGts2Client(unittest.TestCase):
["{python} {script} -o {outpath} -r test -l {lat_ll} -k {lon_ll} -i {lat_ur} -j {lon_ur} "
"-b {bands} -s {start_date} -e {end_date} -m {out_mode} -a {sensor} -t {level} -v {version} "
"-c {coreg} -z {max_cloudy} -f {minimum_fill} -d {utm_zone} -g {stack_res} -p {onlytime}".format(
"-c {coreg} -z {max_cloudy} -f {minimum_fill} -d {utm_zone} -g {stack_res} -p {onlytime}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment