コード例 #1
0
 def test_parse_required_arguments(self):
     self.assertEqual(Command._parse_required_arguments("ARG1 ARG2"),
                      ["ARG1", "ARG2"])
     self.assertEqual(Command._parse_required_arguments("[ARG1] [ARG2]"),
                      [])
     self.assertEqual(Command._parse_required_arguments("[ARG1] ARG2"),
                      ["ARG2"])
     # Note: We might make our arg parsing smarter in the future and allow this type of arguments string.
     self.assertRaises(Exception, Command._parse_required_arguments,
                       "[ARG1 ARG2]")
コード例 #2
0
 def test_parse_required_arguments(self):
     self.assertEqual(Command._parse_required_arguments("ARG1 ARG2"), ["ARG1", "ARG2"])
     self.assertEqual(Command._parse_required_arguments("[ARG1] [ARG2]"), [])
     self.assertEqual(Command._parse_required_arguments("[ARG1] ARG2"), ["ARG2"])
     # Note: We might make our arg parsing smarter in the future and allow this type of arguments string.
     self.assertRaises(Exception, Command._parse_required_arguments, "[ARG1 ARG2]")
コード例 #3
0
 def __init__(self, **kwargs):
     Command.__init__(self, "help text", **kwargs)
コード例 #4
0
 def __init__(self, **kwargs):
     Command.__init__(self, "help text", **kwargs)