Added test for run_erc not boolean.

This commit is contained in:
Salvador E. Tropea 2020-07-08 16:47:07 -03:00
parent 922b853084
commit 4111131008
3 changed files with 24 additions and 2 deletions

View File

@ -335,6 +335,14 @@ def test_error_wrong_type_2():
ctx.clean_up()
def test_error_wrong_type_3():
""" run_erc = number """
ctx = context.TestContext('ErrorWrongType3', PRJ, 'error_pre_wrong_type_3', '')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err("In preflight 'run_erc': must be boolean")
ctx.clean_up()
def test_error_yaml():
ctx = context.TestContext('ErrorYAML', PRJ, 'error_yaml', '')
ctx.run(EXIT_BAD_CONFIG)

View File

@ -4,5 +4,10 @@ kiplot:
preflight:
run_erc: true
filters:
- filter: 'Ignore C3 pad 2 too close to anything'
number: 4
regex: 'Pad 2 of C3'
- filter: 'Ignore unconnected pad 2 of C4'
number: 2
regex: 'Pad 2 of C4'

View File

@ -0,0 +1,9 @@
# Example KiPlot config file
kiplot:
version: 1
preflight:
update_xml: true
run_erc: 1