Adde test for wrong drill map type

This commit is contained in:
Salvador E. Tropea 2020-05-26 13:09:16 -03:00
parent eb77e20f80
commit 4e14891979
2 changed files with 36 additions and 0 deletions

View File

@ -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()

View File

@ -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