Added tests to cover missing lines in out_pdf_pcb_print.py
This commit is contained in:
parent
c67965c91b
commit
f7826a7667
|
|
@ -46,7 +46,8 @@ from kibot.misc import (EXIT_BAD_ARGS, EXIT_BAD_CONFIG, NO_PCB_FILE, NO_SCH_FILE
|
|||
|
||||
|
||||
POS_DIR = 'positiondir'
|
||||
MK_TARGETS = ['position', 'archive', 'interactive_bom', 'run_erc', '3D', 'kibom_internal', 'drill', 'pcb_render']
|
||||
MK_TARGETS = ['position', 'archive', 'interactive_bom', 'run_erc', '3D', 'kibom_internal', 'drill', 'pcb_render',
|
||||
'print_front']
|
||||
|
||||
|
||||
def test_skip_pre_and_outputs(test_dir):
|
||||
|
|
@ -596,6 +597,12 @@ def test_makefile_1(test_dir):
|
|||
assert ctx.get_out_path(prj+'-top$.svg') in deps
|
||||
assert os.path.abspath(targets[targets['pcb_render']]) == ctx.board_file
|
||||
logging.debug('- Target `pcb_render` OK')
|
||||
# print_front target
|
||||
deps = targets['print_front'].split(' ')
|
||||
assert len(deps) == 1, deps
|
||||
assert ctx.get_out_path(prj+'-F_Cu+F_SilkS.pdf') in deps
|
||||
assert os.path.abspath(targets[targets['print_front']]) == ctx.board_file
|
||||
logging.debug('- Target `print_front` OK')
|
||||
# drill target
|
||||
deps = targets['drill'].split(' ')
|
||||
assert len(deps) == 3, deps
|
||||
|
|
|
|||
|
|
@ -445,8 +445,15 @@ def test_error_gerber_precision(test_dir):
|
|||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_error_wrong_drill_marks(test_dir):
|
||||
ctx = context.TestContext(test_dir, 'WrongDrillMarks', PRJ, 'error_wrong_drill_marks', '')
|
||||
def test_error_wrong_drill_marks_1(test_dir):
|
||||
ctx = context.TestContext(test_dir, 'test_error_wrong_drill_marks_1', PRJ, 'error_wrong_drill_marks', '')
|
||||
ctx.run(EXIT_BAD_CONFIG)
|
||||
assert ctx.search_err("Unknown drill mark type: bogus")
|
||||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_error_wrong_drill_marks_2(test_dir):
|
||||
ctx = context.TestContext(test_dir, 'test_error_wrong_drill_marks_2', PRJ, 'error_wrong_drill_marks_2', '')
|
||||
ctx.run(EXIT_BAD_CONFIG)
|
||||
assert ctx.search_err("Unknown drill mark type: bogus")
|
||||
ctx.clean_up()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# Example KiBot config file
|
||||
kibot:
|
||||
version: 1
|
||||
|
||||
outputs:
|
||||
- name: 'print_front'
|
||||
comment: "Print F.Cu+F.SilkS"
|
||||
type: pdf_pcb_print
|
||||
options:
|
||||
scaling: 4
|
||||
drill_marks: bogus
|
||||
plot_sheet_reference: false
|
||||
monochrome: true
|
||||
separated: true
|
||||
mirror: true
|
||||
layers:
|
||||
- layer: F.Cu
|
||||
- layer: F.SilkS
|
||||
|
||||
|
|
@ -59,6 +59,20 @@ outputs:
|
|||
options:
|
||||
output: '%f-%i$.%x'
|
||||
|
||||
- name: 'print_front'
|
||||
comment: "Print F.Cu+F.SilkS"
|
||||
type: pdf_pcb_print
|
||||
options:
|
||||
scaling: 4
|
||||
drill_marks: none
|
||||
plot_sheet_reference: false
|
||||
monochrome: true
|
||||
separated: true
|
||||
mirror: true
|
||||
layers:
|
||||
- layer: F.Cu
|
||||
- layer: F.SilkS
|
||||
|
||||
- name: 'archive'
|
||||
comment: 'Compressed files'
|
||||
type: compress
|
||||
|
|
|
|||
Loading…
Reference in New Issue