From b6347d899219b6bcc4059dd9bf51e8b888b8a14e Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Sun, 12 Jul 2020 16:27:46 -0300 Subject: [PATCH] Drill report now uses %i='drill_report' %x='txt' --- kiplot/out_any_drill.py | 4 ++-- tests/test_plot/test_drill.py | 8 ++++---- tests/yaml_samples/drill_legacy.kiplot.yaml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kiplot/out_any_drill.py b/kiplot/out_any_drill.py index c7671ead..c55af9e7 100644 --- a/kiplot/out_any_drill.py +++ b/kiplot/out_any_drill.py @@ -22,7 +22,7 @@ class DrillReport(Optionable): super().__init__() with document: self.filename = '' - """ name of the drill report. Not generated unless a name is specified. (%i='drill' %x='txt') """ # pragma: no cover + """ name of the drill report. Not generated unless a name is specified. (%i='drill_report' %x='txt') """ # pragma: no cover self._unkown_is_error = True @@ -80,6 +80,6 @@ class AnyDrill(BaseOptions): drill_writer.CreateDrillandMapFilesSet(output_dir, True, gen_map) if self.report: - drill_report_file = self.expand_filename(output_dir, self.report, 'drill', 'txt') + drill_report_file = self.expand_filename(output_dir, self.report, 'drill_report', 'txt') logger.debug("Generating drill report: "+drill_report_file) drill_writer.GenDrillReportFile(drill_report_file) diff --git a/tests/test_plot/test_drill.py b/tests/test_plot/test_drill.py index b18e4a7c..c035fb8b 100644 --- a/tests/test_plot/test_drill.py +++ b/tests/test_plot/test_drill.py @@ -23,11 +23,11 @@ DRILL_DIR = 'Drill' positions = {'R1': (105, 35, 'top'), 'R2': (110, 35, 'bottom'), 'R3': (110, 45, 'top')} -def do_3Rs(conf, dir): +def do_3Rs(conf, dir, report): ctx = context.TestContext(dir, '3Rs', conf, DRILL_DIR) ctx.run() # Check all outputs are there - ctx.expect_out_file(os.path.join(DRILL_DIR, 'report.rpt')) + ctx.expect_out_file(os.path.join(DRILL_DIR, report)) pth_drl = ctx.get_pth_drl_filename() ctx.expect_out_file(pth_drl) npth_drl = ctx.get_npth_drl_filename() @@ -52,8 +52,8 @@ def do_3Rs(conf, dir): def test_drill_3Rs(): - do_3Rs('drill', 'Drill_3Rs') + do_3Rs('drill', 'Drill_3Rs', 'report.rpt') def test_drill_legacy_3Rs(): - do_3Rs('drill_legacy', 'DrillLegacy_3Rs') + do_3Rs('drill_legacy', 'DrillLegacy_3Rs', '3Rs-drill_report.txt') diff --git a/tests/yaml_samples/drill_legacy.kiplot.yaml b/tests/yaml_samples/drill_legacy.kiplot.yaml index e7ca00af..5b0139f0 100644 --- a/tests/yaml_samples/drill_legacy.kiplot.yaml +++ b/tests/yaml_samples/drill_legacy.kiplot.yaml @@ -15,7 +15,7 @@ outputs: minimal_header: false mirror_y_axis: false report: - filename: 'report.rpt' + filename: '%f-%i.%x' map: type: 'pdf'