From c40315e73ee3f1f738aa1810eccbf15b8b3b0f4e Mon Sep 17 00:00:00 2001 From: Pierre Equoy Date: Mon, 11 Mar 2024 17:42:30 +0800 Subject: [PATCH] Add unit test for ListTestplan.register_arguments() --- checkbox-ng/checkbox_ng/launcher/test_subcommands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/checkbox-ng/checkbox_ng/launcher/test_subcommands.py b/checkbox-ng/checkbox_ng/launcher/test_subcommands.py index a4aca2a5c0..ef37747703 100644 --- a/checkbox-ng/checkbox_ng/launcher/test_subcommands.py +++ b/checkbox-ng/checkbox_ng/launcher/test_subcommands.py @@ -685,7 +685,6 @@ def test_invoke_print_output_customized_format(self, stdout): class TestListTestplan(TestCase): - maxDiff = None def setUp(self): self.launcher = ListTestplan() self.ctx = Mock() @@ -741,6 +740,11 @@ def setUp(self): ), ) + def test_register_arguments(self): + parser_mock = Mock() + self.launcher.register_arguments(parser_mock) + self.assertTrue(parser_mock.add_argument.called) + def test_invoke_test_plan_not_found(self): self.ctx.args.TEST_PLAN = "test-plan3"