From 3df9e8b1c7dc23638197399b6ffffa9d9f690de7 Mon Sep 17 00:00:00 2001 From: SET Date: Wed, 12 Aug 2020 20:32:35 -0300 Subject: [PATCH] Added test for invalid column name --- tests/test_plot/test_yaml_errors.py | 7 ++++++ .../error_int_bom_invalid_col.kiplot.yaml | 22 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/yaml_samples/error_int_bom_invalid_col.kiplot.yaml diff --git a/tests/test_plot/test_yaml_errors.py b/tests/test_plot/test_yaml_errors.py index a3d36c0a..34115bdb 100644 --- a/tests/test_plot/test_yaml_errors.py +++ b/tests/test_plot/test_yaml_errors.py @@ -512,3 +512,10 @@ def test_error_int_bom_unknown_style(): ctx.run(EXIT_BAD_CONFIG) assert ctx.search_err("Unknown style .?bogus.?") ctx.clean_up() + + +def test_error_int_bom_invalid_col(): + ctx = context.TestContextSCH('test_error_int_bom_invalid_col', 'links', 'error_int_bom_invalid_col', '') + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err("Invalid column name") + ctx.clean_up() diff --git a/tests/yaml_samples/error_int_bom_invalid_col.kiplot.yaml b/tests/yaml_samples/error_int_bom_invalid_col.kiplot.yaml new file mode 100644 index 00000000..69fba0a6 --- /dev/null +++ b/tests/yaml_samples/error_int_bom_invalid_col.kiplot.yaml @@ -0,0 +1,22 @@ +# Example KiPlot config file +kiplot: + version: 1 + +outputs: + - name: 'bom_internal' + comment: "Bill of Materials in CSV format" + type: bom + dir: BoM + options: + columns: + - field: Rowenta + name: Renglón + - field: Part + name: Componente + - field: Value + name: Valor + - field: digikey# + name: Código Digi-Key + - field: Quantity Per PCB + name: Cantidad por PCB +