From 8f929db8967f959c7d0fbe07ed169007e9c35125 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Mon, 25 May 2020 18:42:56 -0300 Subject: [PATCH] Added simple HPGL test --- tests/test_plot/test_hpgl.py | 31 +++++++++++++++++++++++++++++ tests/yaml_samples/hpgl.kiplot.yaml | 31 +++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tests/test_plot/test_hpgl.py create mode 100644 tests/yaml_samples/hpgl.kiplot.yaml diff --git a/tests/test_plot/test_hpgl.py b/tests/test_plot/test_hpgl.py new file mode 100644 index 00000000..461b108c --- /dev/null +++ b/tests/test_plot/test_hpgl.py @@ -0,0 +1,31 @@ +""" +Tests of HPGL format. + +For debug information use: +pytest-3 --log-cli-level debug +""" + +import os +import sys +# Look for the 'utils' module from where the script is running +script_dir = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, os.path.dirname(script_dir)) +# Utils import +from utils import context + + +PS_DIR = 'HPGL' + + +def test_hpgl(): + prj = 'simple_2layer' + ctx = context.TestContext('HPGL', prj, 'hpgl', PS_DIR) + ctx.run() + + f_cu = ctx.get_gerber_filename('F_Cu', '.plt') + f_silk = ctx.get_gerber_filename('B_Silks', '.plt') + ctx.expect_out_file(f_cu) + ctx.expect_out_file(f_silk) + ctx.dont_expect_out_file(ctx.get_gerber_job_filename()) + + ctx.clean_up() diff --git a/tests/yaml_samples/hpgl.kiplot.yaml b/tests/yaml_samples/hpgl.kiplot.yaml new file mode 100644 index 00000000..8515bd06 --- /dev/null +++ b/tests/yaml_samples/hpgl.kiplot.yaml @@ -0,0 +1,31 @@ +kiplot: + version: 1 + +outputs: + - name: HPGL + comment: "HPGL files" + type: hpgl + dir: HPGL + 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 + check_zone_fills: true + + # HPGL options + drill_marks: full + mirror_plot: true + sketch_plot: true + scaling: 0 # auto + pen_width: 0.5 + layers: + - layer: F.Cu + suffix: F_Cu + - layer: B.SilkS + suffix: B_Silks +