示例#1
0
 def test_add_group_topic_requested_help(self):
     arg_parser = HelpfulArgumentParser(['--help', 'run'], {})
     arg_parser.add_group("run", description="description of run")
     self.assertTrue(arg_parser.groups["run"])
     arg_parser.add_group("certonly", description="description of certonly")
     with self.assertRaises(KeyError):
         self.assertIs(arg_parser.groups["certonly"], False)
示例#2
0
 def test_add_group_topic_not_visible(self):
     # The user request help on run. A topic that given somewhere in the
     # args won't be added to the groups in the parser.
     arg_parser = HelpfulArgumentParser(['--help', 'run'], {})
     arg_parser.add_group("auth", description="description of auth")
     self.assertEqual(arg_parser.groups, {})