diff --git a/src/configuration/parser.py b/src/configuration/parser.py index 0bc921f..dd7ee7c 100644 --- a/src/configuration/parser.py +++ b/src/configuration/parser.py @@ -23,7 +23,7 @@ def process_command_line() -> Configuration: - parser = __setup_parser() + parser = setup_parser() try: args = parser.parse_args() config = Configuration() @@ -158,7 +158,7 @@ def __setup_osmand(args: Namespace, config: Configuration) -> None: config.osmand_use_knots = args.osmand_use_knots -def __setup_parser() -> argparse.ArgumentParser: +def setup_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser(prog="MQTT Gateway", add_help=True) parser.add_argument( "-m", diff --git a/tests/test_parser.py b/tests/test_parser.py new file mode 100644 index 0000000..7437c1f --- /dev/null +++ b/tests/test_parser.py @@ -0,0 +1,9 @@ +from __future__ import annotations + +from configuration.parser import setup_parser + + +def test_setup_parser_should_generate_a_valid_parser() -> None: + parser = setup_parser() + parser.print_help() + assert True