From 8aaa07c867ce89efc2273e146e6ddb55536531e1 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 26 May 2020 13:40:16 -0300 Subject: [PATCH] Added test for missing output.options --- tests/test_plot/test_yaml_errors.py | 8 ++++++++ tests/yaml_samples/error_no_options.kiplot.yaml | 13 +++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/yaml_samples/error_no_options.kiplot.yaml diff --git a/tests/test_plot/test_yaml_errors.py b/tests/test_plot/test_yaml_errors.py index b704f58b..e2d7c2e1 100644 --- a/tests/test_plot/test_yaml_errors.py +++ b/tests/test_plot/test_yaml_errors.py @@ -11,6 +11,7 @@ Tests various errors in the config file - Inner_1 (malformed) - No output.name - No output.type +- No output.options For debug information use: pytest-3 --log-cli-level debug @@ -88,3 +89,10 @@ def test_no_type(): ctx.run(EXIT_BAD_CONFIG) assert ctx.search_err("Output 'PDF' needs a type") ctx.clean_up() + + +def test_no_options(): + ctx = context.TestContext('ErrorNoOptions', '3Rs', 'error_no_options', None) + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err("Output 'PDF' needs options") + ctx.clean_up() diff --git a/tests/yaml_samples/error_no_options.kiplot.yaml b/tests/yaml_samples/error_no_options.kiplot.yaml new file mode 100644 index 00000000..ee5c8601 --- /dev/null +++ b/tests/yaml_samples/error_no_options.kiplot.yaml @@ -0,0 +1,13 @@ +kiplot: + version: 1 + +outputs: + - name: PDF + comment: "PDF files" + type: pdf + dir: PDF + layers: + - layer: F.Cu + suffix: F_Cu + - layer: F.Bogus + suffix: B_Silks