Added test for undocumented plug-in in example generation.
This commit is contained in:
parent
fa7dde3008
commit
fa7fe0a5d6
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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', '')
|
||||
|
|
|
|||
Loading…
Reference in New Issue