Add test and amend docstrings

This commit is contained in:
Maria Mozgunova 2022-07-27 14:10:52 +03:00
parent d54209d2e8
commit 05868f9990
2 changed files with 6 additions and 1 deletions

View file

@ -88,7 +88,7 @@ class DownloadArgsParser:
:param indices: List of indices
:return: Largest integer n + 1 so that all the integers from 0 up to n exist
in the indices.
-1 if indices list is empty or the smallest integer in indices is larger that 0.
0 if indices list is empty or the smallest integer in indices is larger than 0.
"""
largest_consecutive = -1
indices.sort()

View file

@ -86,6 +86,11 @@ class TestDownloadArgsParser:
"dl --parameter.using.list[2] 'v3' --parameter.using.list[1] 'v1' --parameter.using.list[2] 'v2'",
{"parameter": {"using": {"list": ["v1", "v2"]}}},
),
(
None,
"dl --parameter.using.list[3] 'v3' --parameter.using.list[1] 'v1'",
{"parameter": {"using": {"list": ["v1"]}}},
),
(
None,
"dl --parameter.not.using.list[0] 'v0'",