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()