diff --git a/kibot/config_reader.py b/kibot/config_reader.py index 934ac4e5..4eb9addb 100644 --- a/kibot/config_reader.py +++ b/kibot/config_reader.py @@ -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) diff --git a/tests/.config/kiplot/plugins/fil_test.py b/tests/.config/kiplot/plugins/fil_test.py new file mode 100644 index 00000000..9842010a --- /dev/null +++ b/tests/.config/kiplot/plugins/fil_test.py @@ -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 """ diff --git a/tests/test_plot/test_misc.py b/tests/test_plot/test_misc.py index 5f605783..165820db 100644 --- a/tests/test_plot/test_misc.py +++ b/tests/test_plot/test_misc.py @@ -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)