diff --git a/tests/test_plot/test_yaml_errors.py b/tests/test_plot/test_yaml_errors.py index c9de1d5a..5a23111c 100644 --- a/tests/test_plot/test_yaml_errors.py +++ b/tests/test_plot/test_yaml_errors.py @@ -335,6 +335,14 @@ def test_error_wrong_type_2(): ctx.clean_up() +def test_error_wrong_type_3(): + """ run_erc = number """ + ctx = context.TestContext('ErrorWrongType3', PRJ, 'error_pre_wrong_type_3', '') + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err("In preflight 'run_erc': must be boolean") + ctx.clean_up() + + def test_error_yaml(): ctx = context.TestContext('ErrorYAML', PRJ, 'error_yaml', '') ctx.run(EXIT_BAD_CONFIG) diff --git a/tests/yaml_samples/erc.kiplot.yaml b/tests/yaml_samples/erc.kiplot.yaml index cf2a3f4a..6dd08047 100644 --- a/tests/yaml_samples/erc.kiplot.yaml +++ b/tests/yaml_samples/erc.kiplot.yaml @@ -4,5 +4,10 @@ kiplot: preflight: run_erc: true - - + filters: + - filter: 'Ignore C3 pad 2 too close to anything' + number: 4 + regex: 'Pad 2 of C3' + - filter: 'Ignore unconnected pad 2 of C4' + number: 2 + regex: 'Pad 2 of C4' diff --git a/tests/yaml_samples/error_pre_wrong_type_3.kiplot.yaml b/tests/yaml_samples/error_pre_wrong_type_3.kiplot.yaml new file mode 100644 index 00000000..6f1018bd --- /dev/null +++ b/tests/yaml_samples/error_pre_wrong_type_3.kiplot.yaml @@ -0,0 +1,9 @@ +# Example KiPlot config file +kiplot: + version: 1 + +preflight: + update_xml: true + run_erc: 1 + +