From 477c52affe350ca690567d357ac1cc3d6e058a91 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Tue, 26 Apr 2022 12:15:34 -0300 Subject: [PATCH] Made __main__ show the same file names of detected files - Also adapted the tests that looks for debug data about them --- kibot/__main__.py | 2 +- tests/test_plot/test_misc.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/kibot/__main__.py b/kibot/__main__.py index a6372f7f..175ac277 100644 --- a/kibot/__main__.py +++ b/kibot/__main__.py @@ -119,7 +119,7 @@ def solve_config(a_plot_config): plot_configs = glob('*.kibot.yaml')+glob('*.kiplot.yaml')+glob('*.kibot.yaml.gz') if len(plot_configs) == 1: plot_config = plot_configs[0] - logger.info('Using config file: '+plot_config) + logger.info('Using config file: '+os.path.relpath(plot_config)) elif len(plot_configs) > 1: plot_config = plot_configs[0] logger.warning(W_VARCFG + 'More than one config file found in current directory.\n' diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index d7885989..a243ae79 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -209,7 +209,7 @@ def test_miss_yaml_2(test_dir): ctx.clean_up() -def test_auto_pcb_and_cfg(test_dir): +def test_auto_pcb_and_cfg_1(test_dir): """ Test guessing the PCB and config file. Only one them is there. """ prj = '3Rs' @@ -270,8 +270,8 @@ def test_auto_pcb_and_cfg_3(test_dir): ctx.run(extra=['-s', 'all', '-i'], no_out_dir=True, no_board_file=True, no_yaml_file=True, chdir_out=True) - assert ctx.search_out('Using SCH file: '+sch) - assert ctx.search_out('Using config file: '+yaml_file) + ctx.search_out('Using SCH file: '+sch) + ctx.search_out('Using config file: '+yaml_file) ctx.clean_up() @@ -293,8 +293,8 @@ def test_auto_pcb_and_cfg_4(test_dir): ctx.run(extra=['-s', 'all', '-i'], no_out_dir=True, no_board_file=True, no_yaml_file=True, chdir_out=True) - assert ctx.search_err('Using '+sch) - assert ctx.search_out('Using config file: '+yaml_file) + ctx.search_err('Using ./'+sch) + ctx.search_out('Using config file: '+yaml_file) ctx.clean_up() @@ -313,7 +313,7 @@ def test_auto_pcb_and_cfg_5(test_dir): ctx.run(extra=['-s', 'all', '-i'], no_out_dir=True, no_board_file=True, no_yaml_file=True, chdir_out=True) - assert ctx.search_err('Using (b_)?'+sch) + assert ctx.search_err('Using ./(b_)?'+sch) assert ctx.search_out('Using config file: '+yaml_file) ctx.clean_up()