Added test for missing drill map type

This commit is contained in:
Salvador E. Tropea 2020-05-26 13:04:56 -03:00
parent 64de376c2b
commit eb77e20f80
2 changed files with 35 additions and 0 deletions

View File

@ -3,6 +3,7 @@ Tests various errors in the config file
- No kiplot.version
- Wrong kiplot.version
- Missing drill map type
For debug information use:
pytest-3 --log-cli-level debug
@ -31,3 +32,10 @@ def test_wrong_version():
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err('Unknown KiPlot config version: 20')
ctx.clean_up()
def test_drill_map_no_type():
ctx = context.TestContext('ErrorDrillMapNoType', '3Rs', 'error_drill_map_no_type', None)
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Missing `type' in drill map section")
ctx.clean_up()

View File

@ -0,0 +1,27 @@
# 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:
- name: gerber_drills
comment: "Gerber drill files"
type: gerb_drill
dir: Drill
options:
use_aux_axis_as_origin: false