Added test for wrong boolean
This commit is contained in:
parent
1917b4c601
commit
05460f4541
|
|
@ -96,7 +96,8 @@ class Optionable(object):
|
|||
# We know the type matches, now apply validations
|
||||
if isinstance(v, (int, float)) and not isinstance(v, bool):
|
||||
# Note: booleans are also instance of int
|
||||
Optionable._check_num(k, v, cur_doc)
|
||||
# Not used yet
|
||||
Optionable._check_num(k, v, cur_doc) # pragma: no cover
|
||||
elif isinstance(v, str):
|
||||
Optionable._check_str(k, v, cur_doc)
|
||||
elif isinstance(v, dict):
|
||||
|
|
|
|||
|
|
@ -394,6 +394,13 @@ def test_error_bom_wrong_format():
|
|||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_error_wrong_boolean():
|
||||
ctx = context.TestContext('WrongBoolean', PRJ, 'error_wrong_boolean', '')
|
||||
ctx.run(EXIT_BAD_CONFIG)
|
||||
assert ctx.search_err(".?exclude_edge_layer.? must be true/false")
|
||||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_error_gerber_precision():
|
||||
ctx = context.TestContext('GerberPrecisionError', PRJ, 'error_gerber_precision', '')
|
||||
ctx.run(EXIT_BAD_CONFIG)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
# Example KiPlot config file for a basic 2-layer board
|
||||
kiplot:
|
||||
version: 1
|
||||
|
||||
outputs:
|
||||
|
||||
- name: 'gerbers'
|
||||
comment: "Gerbers for the Gerber god"
|
||||
type: gerber
|
||||
dir: gerberdir
|
||||
options:
|
||||
# generic layer options
|
||||
exclude_edge_layer: 5
|
||||
exclude_pads_from_silkscreen: false
|
||||
use_aux_axis_as_origin: false
|
||||
plot_sheet_reference: false
|
||||
plot_footprint_refs: true
|
||||
plot_footprint_values: true
|
||||
force_plot_invisible_refs_vals: false
|
||||
tent_vias: true
|
||||
|
||||
# gerber options
|
||||
line_width: 0.15
|
||||
subtract_mask_from_silk: true
|
||||
use_protel_extensions: false
|
||||
gerber_precision: 4.5
|
||||
create_gerber_job_file: true
|
||||
use_gerber_x2_attributes: true
|
||||
use_gerber_net_attributes: false
|
||||
|
||||
layers:
|
||||
- layer: F.Cu
|
||||
suffix: F_Cu
|
||||
- layer: F.SilkS
|
||||
suffix: F_SilkS
|
||||
|
||||
Loading…
Reference in New Issue