diff --git a/tests/test_plot/test_yaml_errors.py b/tests/test_plot/test_yaml_errors.py index ee4f4dbe..cd74e4bc 100644 --- a/tests/test_plot/test_yaml_errors.py +++ b/tests/test_plot/test_yaml_errors.py @@ -4,6 +4,7 @@ Tests various errors in the config file - No kiplot.version - Wrong kiplot.version - Missing drill map type +- Wrong drill map type For debug information use: pytest-3 --log-cli-level debug @@ -39,3 +40,10 @@ def test_drill_map_no_type(): ctx.run(EXIT_BAD_CONFIG) assert ctx.search_err("Missing `type' in drill map section") ctx.clean_up() + + +def test_drill_map_wrong_type(): + ctx = context.TestContext('ErrorDrillMapWrongType', '3Rs', 'error_drill_map_wrong_type', None) + ctx.run(EXIT_BAD_CONFIG) + assert ctx.search_err("Unknown drill map type: bogus") + ctx.clean_up() diff --git a/tests/yaml_samples/error_drill_map_wrong_type.kiplot.yaml b/tests/yaml_samples/error_drill_map_wrong_type.kiplot.yaml new file mode 100644 index 00000000..f91d3d74 --- /dev/null +++ b/tests/yaml_samples/error_drill_map_wrong_type.kiplot.yaml @@ -0,0 +1,28 @@ +# Drills and Gerber drills +kiplot: + version: 1 + +outputs: + + - name: excellon_drill + comment: "Excellon drill files" + type: excellon + dir: Drill + options: + metric_units: true + pth_and_npth_single_file: false + use_aux_axis_as_origin: false + minimal_header: false + mirror_y_axis: false + report: + filename: 'report.rpt' + map: + type: 'bogus' + + - name: gerber_drills + comment: "Gerber drill files" + type: gerb_drill + dir: Drill + options: + use_aux_axis_as_origin: false +