Made __main__ show the same file names of detected files

- Also adapted the tests that looks for debug data about them
This commit is contained in:
Salvador E. Tropea 2022-04-26 12:15:34 -03:00
parent e1586484f5
commit 477c52affe
2 changed files with 7 additions and 7 deletions

View File

@ -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'

View File

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