Added test for undocumented option.
This commit is contained in:
parent
9807bcb13f
commit
ba6787660c
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue