Added test for failling DRC

This commit is contained in:
Salvador E. Tropea 2020-07-08 16:52:53 -03:00
parent 4111131008
commit 4869ead2eb
1 changed files with 15 additions and 1 deletions

View File

@ -4,6 +4,9 @@ Tests for the preflight options
We test:
- ERC
- DRC
- ignore_unconnected
- error
- filter
- XML update
For debug information use:
@ -20,6 +23,7 @@ if prev_dir not in sys.path:
sys.path.insert(0, prev_dir)
# Utils import
from utils import context
from kiplot.misc import (DRC_ERROR)
def test_erc():
@ -53,13 +57,23 @@ def test_drc_filter():
def test_drc_unco():
""" Check we can ignore unconnected nets """
prj = 'warning-project'
ctx = context.TestContext('DRC', prj, 'drc_unco', '')
ctx = context.TestContext('DRCUnco', prj, 'drc_unco', '')
ctx.run()
# Check all outputs are there
ctx.expect_out_file('drc_result.rpt')
ctx.clean_up()
def test_drc_error():
""" Check we catch DRC errors """
prj = 'warning-project'
ctx = context.TestContext('DRCError', prj, 'drc', '')
ctx.run(DRC_ERROR)
# Check all outputs are there
ctx.expect_out_file('drc_result.rpt')
ctx.clean_up()
def test_update_xml():
prj = 'bom'
ctx = context.TestContext('Update_XML', prj, 'update_xml', '')