diff --git a/tests/test_plot/test_yaml_errors.py b/tests/test_plot/test_yaml_errors.py index 84b9e75a..f9ae2934 100644 --- a/tests/test_plot/test_yaml_errors.py +++ b/tests/test_plot/test_yaml_errors.py @@ -862,3 +862,21 @@ def test_import_no_str_or_dict(test_dir): ctx.run(EXIT_BAD_CONFIG) assert ctx.search_err(r"`import` items must be strings or dicts") ctx.clean_up(keep_project=True) + + +@pytest.mark.indep +def test_download_datasheets_no_field(test_dir): + """ Download datasheet no field specified """ + ctx = context.TestContext(test_dir, 'bom', 'error_download_datasheets_no_field') + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err(r"Empty `field`") + ctx.clean_up(keep_project=True) + + +@pytest.mark.indep +def test_download_datasheets_no_output(test_dir): + """ Download datasheet no output specified """ + ctx = context.TestContext(test_dir, 'bom', 'error_download_datasheets_no_output') + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err(r"Empty `output`") + ctx.clean_up(keep_project=True) diff --git a/tests/yaml_samples/error_download_datasheets_no_field.kibot.yaml b/tests/yaml_samples/error_download_datasheets_no_field.kibot.yaml new file mode 100644 index 00000000..4ceb3157 --- /dev/null +++ b/tests/yaml_samples/error_download_datasheets_no_field.kibot.yaml @@ -0,0 +1,11 @@ +# Example KiBot config file +kibot: + version: 1 + +outputs: + - name: 'down_ds' + comment: "Datasheets" + type: download_datasheets + dir: DS + options: + field: '' diff --git a/tests/yaml_samples/error_download_datasheets_no_output.kibot.yaml b/tests/yaml_samples/error_download_datasheets_no_output.kibot.yaml new file mode 100644 index 00000000..fe0c07e9 --- /dev/null +++ b/tests/yaml_samples/error_download_datasheets_no_output.kibot.yaml @@ -0,0 +1,11 @@ +# Example KiBot config file +kibot: + version: 1 + +outputs: + - name: 'down_ds' + comment: "Datasheets" + type: download_datasheets + dir: DS + options: + output: ''