diff --git a/kibot/config_reader.py b/kibot/config_reader.py index 4eb9addb..2aa96511 100644 --- a/kibot/config_reader.py +++ b/kibot/config_reader.py @@ -427,7 +427,7 @@ def create_example(pcb_file, out_dir, copy_options, copy_expand): for n, cls in OrderedDict(sorted(outs.items())).items(): lines = trim(cls.__doc__) if len(lines) == 0: - lines = ['Undocumented', 'No description'] # pragma: no cover (Internal) + lines = ['Undocumented', 'No description'] f.write(' # '+lines[0].rstrip()+':\n') for ln in range(2, len(lines)): f.write(' # '+lines[ln].rstrip()+'\n') diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 165820db..d0b4c38c 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -472,6 +472,17 @@ def test_example_6(test_dir): ctx.clean_up() +def test_example_7(test_dir, monkeypatch): + """ With dummy plug-ins """ + ctx = context.TestContext(test_dir, 'Example7', '3Rs', 'pre_and_position', '') + with monkeypatch.context() as m: + m.setenv("HOME", os.path.join(ctx.get_board_dir(), '../..')) + ctx.run(extra=['--example'], no_verbose=True, no_yaml_file=True, no_board_file=True) + assert ctx.expect_out_file(EXAMPLE_CFG) + ctx.search_in_file(EXAMPLE_CFG, ['# Undocumented:', "comment: 'No description'"]) + ctx.clean_up() + + def test_corrupted_pcb(test_dir): prj = 'bom_no_xml' ctx = context.TestContext(test_dir, 'Corrupted', prj, 'print_pcb', '')