diff --git a/kiplot/out_position.py b/kiplot/out_position.py index d14a4fee..492e11a7 100644 --- a/kiplot/out_position.py +++ b/kiplot/out_position.py @@ -17,7 +17,7 @@ class PositionOptions(BaseOptions): self.only_smd = True """ only include the surface mount components """ self.output = '%f-%i.%x' - """ output file name (%i='top'|'bottom'|'both', %x='pos'|'csv') """ + """ output file name (%i='top_pos'|'bottom_pos'|'both_pos', %x='pos'|'csv') """ self.units = 'millimeters' """ [millimeters,inches] units used for the positions """ # pragma: no cover @@ -26,10 +26,10 @@ class PositionOptions(BaseOptions): botf = None bothf = None if self.separate_files_for_front_and_back: - topf = open(self.expand_filename(output_dir, self.output, 'top', 'pos'), 'w') - botf = open(self.expand_filename(output_dir, self.output, 'bottom', 'pos'), 'w') + topf = open(self.expand_filename(output_dir, self.output, 'top_pos', 'pos'), 'w') + botf = open(self.expand_filename(output_dir, self.output, 'bottom_pos', 'pos'), 'w') else: - bothf = open(self.expand_filename(output_dir, self.output, 'both', 'pos'), 'w') + bothf = open(self.expand_filename(output_dir, self.output, 'both_pos', 'pos'), 'w') files = [f for f in [topf, botf, bothf] if f is not None] for f in files: @@ -84,10 +84,10 @@ class PositionOptions(BaseOptions): botf = None bothf = None if self.separate_files_for_front_and_back: - topf = open(self.expand_filename(output_dir, self.output, 'top', 'csv'), 'w') - botf = open(self.expand_filename(output_dir, self.output, 'bottom', 'csv'), 'w') + topf = open(self.expand_filename(output_dir, self.output, 'top_pos', 'csv'), 'w') + botf = open(self.expand_filename(output_dir, self.output, 'bottom_pos', 'csv'), 'w') else: - bothf = open(self.expand_filename(output_dir, self.output, 'both', 'csv'), 'w') + bothf = open(self.expand_filename(output_dir, self.output, 'both_pos', 'csv'), 'w') files = [f for f in [topf, botf, bothf] if f is not None] diff --git a/tests/test_plot/test_position.py b/tests/test_plot/test_position.py index 60f34882..cdf4e447 100644 --- a/tests/test_plot/test_position.py +++ b/tests/test_plot/test_position.py @@ -88,7 +88,7 @@ def test_3Rs_position_unified(): def test_3Rs_position_unified_th(): ctx = context.TestContext('3Rs_position_unified_th', '3Rs', 'simple_position_unified_th', POS_DIR) ctx.run() - expect_position(ctx, os.path.join(POS_DIR, ctx.board_name+'-both-pos.pos'), ['R1', 'R2', 'R3']) + expect_position(ctx, os.path.join(POS_DIR, ctx.board_name+'-position.pos'), ['R1', 'R2', 'R3']) ctx.clean_up() diff --git a/tests/utils/context.py b/tests/utils/context.py index 2f0c282a..406b92f1 100644 --- a/tests/utils/context.py +++ b/tests/utils/context.py @@ -96,22 +96,22 @@ class TestContext(object): return os.path.join(self.sub_dir, self.board_name+'-'+layer_slug+ext) def get_pos_top_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-top.pos') + return os.path.join(self.sub_dir, self.board_name+'-top_pos.pos') def get_pos_bot_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-bottom.pos') + return os.path.join(self.sub_dir, self.board_name+'-bottom_pos.pos') def get_pos_both_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-both.pos') + return os.path.join(self.sub_dir, self.board_name+'-both_pos.pos') def get_pos_top_csv_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-top.csv') + return os.path.join(self.sub_dir, self.board_name+'-top_pos.csv') def get_pos_bot_csv_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-bottom.csv') + return os.path.join(self.sub_dir, self.board_name+'-bottom_pos.csv') def get_pos_both_csv_filename(self): - return os.path.join(self.sub_dir, self.board_name+'-both.csv') + return os.path.join(self.sub_dir, self.board_name+'-both_pos.csv') def get_pth_drl_filename(self): return os.path.join(self.sub_dir, self.board_name+'-PTH.drl') diff --git a/tests/yaml_samples/simple_position_unified_th.kiplot.yaml b/tests/yaml_samples/simple_position_unified_th.kiplot.yaml index 42b36a4d..ffbf58f5 100644 --- a/tests/yaml_samples/simple_position_unified_th.kiplot.yaml +++ b/tests/yaml_samples/simple_position_unified_th.kiplot.yaml @@ -12,5 +12,5 @@ outputs: format: ASCII # CSV or ASCII format units: millimeters # millimeters or inches separate_files_for_front_and_back: false - output: '%f-%i-pos.%x' + output: '%f-position.%x' only_smd: false