Added test for undocumented filter.
This commit is contained in:
parent
dd28c63089
commit
fa7dde3008
|
|
@ -329,7 +329,7 @@ def print_filters_help():
|
|||
for n, o in OrderedDict(sorted(fils.items())).items():
|
||||
help = o.__doc__
|
||||
if help is None:
|
||||
help = 'Undocumented' # pragma: no cover (Internal)
|
||||
help = 'Undocumented'
|
||||
print('- {}: {}.'.format(n, help.strip()))
|
||||
print_output_options(n, o, 2)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
from kibot.macros import macros, document, filter_class # noqa: F401
|
||||
from . import log
|
||||
|
||||
logger = log.get_logger(__name__)
|
||||
|
||||
|
||||
@filter_class
|
||||
class Filter_Test(BaseFilter): # noqa: F821
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
with document:
|
||||
self.foo = ':'
|
||||
self.bar = False
|
||||
""" Rename fields matching the variant to the value of the component """
|
||||
|
|
@ -392,6 +392,16 @@ def test_help_output_plugin_3(test_dir, monkeypatch):
|
|||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_help_output_plugin_4(test_dir, monkeypatch):
|
||||
ctx = context.TestContext(test_dir, 'test_help_output_plugin_4', '3Rs', 'pre_and_position', POS_DIR)
|
||||
with monkeypatch.context() as m:
|
||||
m.setenv("HOME", os.path.join(ctx.get_board_dir(), '../..'))
|
||||
logging.debug('HOME='+os.environ['HOME'])
|
||||
ctx.run(extra=['--help-filters'], no_verbose=True, no_out_dir=True, no_yaml_file=True, no_board_file=True)
|
||||
assert ctx.search_out('- filter_test: Undocumented')
|
||||
ctx.clean_up()
|
||||
|
||||
|
||||
def test_help_outputs(test_dir):
|
||||
ctx = context.TestContext(test_dir, 'HelpOutputs', '3Rs', 'pre_and_position', POS_DIR)
|
||||
ctx.run(extra=['--help-outputs'], no_verbose=True, no_out_dir=True, no_yaml_file=True, no_board_file=True)
|
||||
|
|
|
|||
Loading…
Reference in New Issue