Added test for undocumented option.

This commit is contained in:
Salvador E. Tropea 2021-02-04 10:42:02 -03:00
parent 9807bcb13f
commit ba6787660c
3 changed files with 3 additions and 1 deletions

View File

@ -252,7 +252,7 @@ def print_output_options(name, cl, indent):
else: else:
entry = ' - `{}`: ' entry = ' - `{}`: '
if help is None: if help is None:
help = 'Undocumented' # pragma: no cover (Internal) help = 'Undocumented'
lines = help.split('\n') lines = help.split('\n')
preface = ind_str+entry.format(k) preface = ind_str+entry.format(k)
clines = len(lines) clines = len(lines)

View File

@ -11,6 +11,7 @@ class TestOptions(BaseOptions):
with document: with document:
self.foo = True self.foo = True
""" chocolate """ """ chocolate """
self.not_documented = 1
self.bar = 'nope' self.bar = 'nope'
""" nothing """ # pragma: no cover """ nothing """ # pragma: no cover

View File

@ -364,6 +364,7 @@ def test_help_output_plugin_1(test_dir, monkeypatch):
assert ctx.search_out('Type: .?test.?') assert ctx.search_out('Type: .?test.?')
assert ctx.search_out('nothing') assert ctx.search_out('nothing')
assert ctx.search_out('chocolate') assert ctx.search_out('chocolate')
assert ctx.search_out('`not_documented`: Undocumented')
ctx.clean_up() ctx.clean_up()