Commit 1fc4450e authored by Hannes Diedrich's avatar Hannes Diedrich
Browse files

Included test for band parameter.

parent 8fe6ebab
Pipeline #1806 passed with stages
in 17 minutes and 22 seconds
......@@ -728,6 +728,9 @@ def client(outpath="", out_prefix="", out_mode="json", geo_ll=(), geo_ur=(), sen
if out_mode == "stack" and "B01" in bands:
raise AssertionError("Band 1 (B01) can not be stacked. Please request separately.")
if out_mode != "rgb" and bands == "":
raise AssertionError("Please provide at least one band.")
valid_out_modes = ["json", "nc", "single", "stack", "python", "rgb"]
try:
assert out_mode in valid_out_modes
......@@ -849,7 +852,7 @@ if __name__ == "__main__":
help="processing level (e.g. L2A)")
parser.add_argument("-v", "--version", action="store", required=False, type=str, default="0.12",
help="version of atmospheric correction (e.g. 0.10)")
parser.add_argument("-b", "--bands", action="store", required=False, type=str,
parser.add_argument("-b", "--bands", action="store", required=False, type=str, default="",
help="list of Bands (e.g. -b B02_B03")
parser.add_argument("-s", "--start_date", action="store", required=True, type=str,
help="Startdate e.g. 20160701")
......
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