Added tests for errors parsing STEP files generation.

This commit is contained in:
Salvador E. Tropea 2020-06-15 13:40:30 -03:00
parent 685fef2ef6
commit fc19d2c6c0
3 changed files with 44 additions and 0 deletions

View File

@ -5,6 +5,8 @@ Tests various errors in the config file
- Wrong kiplot.version
- Missing drill map type
- Wrong drill map type
- Wrong step origin
- Wrong step min_distance
- Wrong layer:
- Incorrect name
- Inner.1, but no inner layers
@ -105,3 +107,17 @@ def test_no_layers():
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("You must specify the layers for `PDF`")
ctx.clean_up()
def test_error_step_origin():
ctx = context.TestContext('ErrorStepOrigin', 'bom', 'error_step_origin', None)
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("Origin must be")
ctx.clean_up()
def test_error_step_min_distance():
ctx = context.TestContext('ErrorStepMinDistance', 'bom', 'error_step_min_distance', None)
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("min_distance must be a number")
ctx.clean_up()

View File

@ -0,0 +1,14 @@
kiplot:
version: 1
outputs:
- name: Step
comment: "Generate 3D model (STEP)"
type: step
dir: 3D
options:
metric_units: true
origin: drill # "grid" or "drill" o "X,Y" i.e. 3.2,-10
#no_virtual: false # exclude 3D models for components with 'virtual' attribute
min_distance: bogus # Minimum distance between points to treat them as separate ones (default 0.01 mm)
#output: project.step

View File

@ -0,0 +1,14 @@
kiplot:
version: 1
outputs:
- name: Step
comment: "Generate 3D model (STEP)"
type: step
dir: 3D
options:
metric_units: true
origin: bogus # "grid" or "drill" o "X,Y" i.e. 3.2,-10
#no_virtual: false # exclude 3D models for components with 'virtual' attribute
#min_distance: 0.01 # Minimum distance between points to treat them as separate ones (default 0.01 mm)
#output: project.step