(1) The test suite for the filtering functionality (see test_download_files_filter_*()) currently use the test record 3005. However, this record contains only a single file, which cannot test various scenarios (such as getting files 1-3).
It would be therefore good to amend these tests to use record 5500 which has several inputs files to choose from. It could also test exactly the same examples that we promise in the docstring when somebody does cernopendata-client download-files --help.
That said, the filters work fine :+1: this issue is only about enriching tests to be able to have more files to filter from to cover more usage scenarios.
(2) One could also add three more simple test such as filtering for a non-existing file name (--filter-name notexisting) should return error message, and (2b) the same for regexp and (2c) the same for fwrong range (--filter-range 0 and --filter-range 99998-99999). Albeit the last one is kind of tested elsewhere in test_validate_range() as well.
(1) The test suite for the filtering functionality (see
test_download_files_filter_*()
) currently use the test record 3005. However, this record contains only a single file, which cannot test various scenarios (such as getting files 1-3).It would be therefore good to amend these tests to use record 5500 which has several inputs files to choose from. It could also test exactly the same examples that we promise in the docstring when somebody does
cernopendata-client download-files --help
.That said, the filters work fine :+1: this issue is only about enriching tests to be able to have more files to filter from to cover more usage scenarios.
(2) One could also add three more simple test such as filtering for a non-existing file name (
--filter-name notexisting
) should return error message, and (2b) the same for regexp and (2c) the same for fwrong range (--filter-range 0
and--filter-range 99998-99999
). Albeit the last one is kind of tested elsewhere intest_validate_range()
as well.