Added tests to fully cover config_reader.
- Output comment as None - Empty output name - Empty variant type
This commit is contained in:
parent
d12837d5ba
commit
80df7d76c7
|
|
@ -223,7 +223,14 @@ def test_wrong_layer_8(test_dir):
|
||||||
|
|
||||||
|
|
||||||
def test_no_name(test_dir):
|
def test_no_name(test_dir):
|
||||||
ctx = context.TestContext(test_dir, 'ErrorNoName', '3Rs', 'error_no_name', None)
|
ctx = context.TestContext(test_dir, 'test_no_name', '3Rs', 'error_no_name', None)
|
||||||
|
ctx.run(EXIT_BAD_CONFIG)
|
||||||
|
assert ctx.search_err("Output needs a name")
|
||||||
|
ctx.clean_up()
|
||||||
|
|
||||||
|
|
||||||
|
def test_empty_name(test_dir):
|
||||||
|
ctx = context.TestContext(test_dir, 'test_empty_name', '3Rs', 'error_empty_name', None)
|
||||||
ctx.run(EXIT_BAD_CONFIG)
|
ctx.run(EXIT_BAD_CONFIG)
|
||||||
assert ctx.search_err("Output needs a name")
|
assert ctx.search_err("Output needs a name")
|
||||||
ctx.clean_up()
|
ctx.clean_up()
|
||||||
|
|
@ -565,6 +572,13 @@ def test_error_var_no_type(test_dir):
|
||||||
ctx.clean_up()
|
ctx.clean_up()
|
||||||
|
|
||||||
|
|
||||||
|
def test_error_var_empty_type(test_dir):
|
||||||
|
ctx = context.TestContextSCH(test_dir, 'test_error_var_empty_type', 'links', 'error_var_empty_type', '')
|
||||||
|
ctx.run(EXIT_BAD_CONFIG)
|
||||||
|
assert ctx.search_err("Variant (.*) needs a type")
|
||||||
|
ctx.clean_up()
|
||||||
|
|
||||||
|
|
||||||
def test_error_var_no_list(test_dir):
|
def test_error_var_no_list(test_dir):
|
||||||
ctx = context.TestContextSCH(test_dir, 'test_error_var_no_list', 'links', 'error_var_no_list', '')
|
ctx = context.TestContextSCH(test_dir, 'test_error_var_no_list', 'links', 'error_var_no_list', '')
|
||||||
ctx.run(EXIT_BAD_CONFIG)
|
ctx.run(EXIT_BAD_CONFIG)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
kibot:
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
- comment:
|
||||||
|
name: 'bogus'
|
||||||
|
type: pdf
|
||||||
|
|
||||||
|
- comment: 'Test'
|
||||||
|
name: ''
|
||||||
|
type: pdf
|
||||||
|
dir: PDF
|
||||||
|
options:
|
||||||
|
exclude_edge_layer: false
|
||||||
|
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
|
||||||
|
|
||||||
|
# PDF options
|
||||||
|
drill_marks: small
|
||||||
|
mirror_plot: false
|
||||||
|
negative_plot: false
|
||||||
|
line_width: 0.01
|
||||||
|
layers:
|
||||||
|
- layer: F.Cu
|
||||||
|
suffix: F_Cu
|
||||||
|
- layer: F.Bogus
|
||||||
|
suffix: B_Silks
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
kibot:
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
variants:
|
||||||
|
- name: ok
|
||||||
|
type: ''
|
||||||
|
|
||||||
Loading…
Reference in New Issue